aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-01 15:13:52 -0400
committerKen Moore <ken@ixsystems.com>2017-11-01 15:13:52 -0400
commitb82e9b864dc3f5321fc47f3e4b0e1e6fdca9f1fc (patch)
treee98d421855e3d77b9887e79bd060867a3b745e6c /src-qt5/desktop-utils/lumina-fileinfo/main.cpp
parentQuick cleanup of input parsing in lumina-archiver. (diff)
downloadlumina-b82e9b864dc3f5321fc47f3e4b0e1e6fdca9f1fc.tar.gz
lumina-b82e9b864dc3f5321fc47f3e4b0e1e6fdca9f1fc.tar.bz2
lumina-b82e9b864dc3f5321fc47f3e4b0e1e6fdca9f1fc.zip
Rework quite a bit of the lumina-fileinfo backend.
Still not quite finished yet, but it is already much more stable/reliable. Just need to add new features.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fileinfo/main.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-fileinfo/main.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src-qt5/desktop-utils/lumina-fileinfo/main.cpp b/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
index 463f856a..ce62399d 100644
--- a/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
+++ b/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
@@ -20,26 +20,17 @@ int main(int argc, char ** argv)
QString flag = "";
for(int i=1; i<argc; i++){
QString tmp(argv[i]);
- if( tmp=="-application" ){ flag = "APP"; }
- else if( tmp=="-link" ){ flag = "APP"; }
- else{ path = QString(argv[i]); break; }
+ if( tmp=="--new-application" ){ flag = "APP"; }
+ else if( tmp=="--new-link" ){ flag = "LINK"; }
+ else if(!tmp.startsWith("-")){ path = QString(argv[i]); break; }
}
//Check the input variables
// - path
if(!path.isEmpty()){ path = LUtils::PathToAbsolute(path); }
-
- if(!path.isEmpty() || !flag.isEmpty()){
+ if(path.isEmpty() && flag.isEmpty()){ flag = "APP"; }
MainUI w;
w.LoadFile(path, flag);
w.show();
int retCode = a.exec();
return retCode;
- }else{
- //Show an error text and exit
- qDebug() << "ERROR: Invalid input arguments";
- qDebug() << "Usage: \"lumina-fileinfo [-application | -link] [file]";
- return 1;
- }
-
-
}
bgstack15