aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fileinfo/main.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-fileinfo/main.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src-qt5/desktop-utils/lumina-fileinfo/main.cpp b/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
index a602f290..463f856a 100644
--- a/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
+++ b/src-qt5/desktop-utils/lumina-fileinfo/main.cpp
@@ -11,36 +11,25 @@ int main(int argc, char ** argv)
{
LTHEME::LoadCustomEnvSettings();
QApplication a(argc, argv);
- a.setAttribute(Qt::AA_UseHighDpiPixmaps);
+ a.setAttribute(Qt::AA_UseHighDpiPixmaps);
LUtils::LoadTranslation(&a, "l-fileinfo");
- //LuminaThemeEngine theme(&a);
//Read the input variables
QString path = "";
QString flag = "";
for(int i=1; i<argc; i++){
- if( QString(argv[i]).startsWith("-") ){ flag = QString(argv[i]); }
+ QString tmp(argv[i]);
+ if( tmp=="-application" ){ flag = "APP"; }
+ else if( tmp=="-link" ){ flag = "APP"; }
else{ path = QString(argv[i]); break; }
}
//Check the input variables
// - path
if(!path.isEmpty()){ path = LUtils::PathToAbsolute(path); }
- // - flag
- if(!flag.isEmpty()){
- if(flag=="-application"){
- flag = "APP"; //for internal use
- }else if(flag=="-link"){
- flag = "LINK"; //for internal use
- }else{
- //Invalid flag - clear the path as well
- flag.clear();
- path.clear();
- }
- }
- if(!path.isEmpty() || !flag.isEmpty()){
+
+ if(!path.isEmpty() || !flag.isEmpty()){
MainUI w;
- //QObject::connect(&theme, SIGNAL(updateIcons()), &w, SLOT(UpdateIcons()) );
w.LoadFile(path, flag);
w.show();
int retCode = a.exec();
bgstack15