showpic now without -showpic= possible
This commit is contained in:
parent
efe1727170
commit
53daa7c92d
1 changed files with 11 additions and 1 deletions
12
main.cpp
12
main.cpp
|
@ -21,7 +21,7 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDebug>
|
#include <QFile>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ int main(int argc, char *argv[])
|
||||||
QStringList applicationArgs = a.arguments();
|
QStringList applicationArgs = a.arguments();
|
||||||
QString selectedAction;
|
QString selectedAction;
|
||||||
QString arg1;
|
QString arg1;
|
||||||
|
applicationArgs.removeAt(0);
|
||||||
|
|
||||||
foreach(QString currentArg, applicationArgs)
|
foreach(QString currentArg, applicationArgs)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +41,15 @@ int main(int argc, char *argv[])
|
||||||
arg1 = reworkedArg;
|
arg1 = reworkedArg;
|
||||||
selectedAction = "showpic";
|
selectedAction = "showpic";
|
||||||
}
|
}
|
||||||
|
else if (selectedAction == "")
|
||||||
|
{
|
||||||
|
QFile argumentFile(currentArg);
|
||||||
|
if (argumentFile.exists())
|
||||||
|
{
|
||||||
|
arg1 = currentArg;
|
||||||
|
selectedAction = "showpic";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedAction == "showpic")
|
if (selectedAction == "showpic")
|
||||||
|
|
Loading…
Reference in a new issue