diff options
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 2 | ||||
-rw-r--r-- | src-qt5/core/libLumina/RootWindow.cpp | 2 | ||||
-rw-r--r-- | src-qt5/core/libLumina/XDGMime.cpp | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index dea1938b..c1e7e199 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -445,6 +445,7 @@ bool XDGDesktop::setAutoStarted(bool autostart){ } void XDGDesktop::addToMenu(QMenu *topmenu){ + if(!this->isValid()){ return; } if(actions.isEmpty()){ //Just a single entry point - no extra actions QAction *act = new QAction(this->name, topmenu); @@ -617,6 +618,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){ menu->setIcon(LXDG::findIcon(icon,"")); QList<XDGDesktop*> appL = APPS.value(cats[i]); for( int a=0; a<appL.length(); a++){ appL[a]->addToMenu(menu); } + topmenu->addMenu(menu); } //end loop over cats }else{ QList<XDGDesktop*> APPS = this->apps(false, false); diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 996b8e01..952e246b 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -10,7 +10,7 @@ #include <QScreen> #include <QDebug> -#define DEBUG 1 +#define DEBUG 0 // === PUBLIC === RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ diff --git a/src-qt5/core/libLumina/XDGMime.cpp b/src-qt5/core/libLumina/XDGMime.cpp index 3983f6b5..cbbeff75 100644 --- a/src-qt5/core/libLumina/XDGMime.cpp +++ b/src-qt5/core/libLumina/XDGMime.cpp @@ -12,6 +12,9 @@ static QStringList mimeglobs; static qint64 mimechecktime; QString XDGMime::fromFileName(QString filename){ + if(QFile::exists(filename) && QFileInfo(filename).isDir()){ + return "inode/directory"; + } //Convert a filename into a mimetype return findAppMimeForFile(filename.section("/",-1),false); } |