summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 1c35720b..f9cafc95 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -38,6 +38,7 @@
#include "shared/directoryentry.h"
#include "shared/filesorigin.h"
#include "shared/fileentry.h"
+#include "shared/util.h"
#include <QApplication>
#include <QCoreApplication>
@@ -395,7 +396,9 @@ void OrganizerCore::profileRemoved(QString const& profileName)
void OrganizerCore::externalMessage(const QString &message)
{
- if (MOShortcut moshortcut{ message } ) {
+ MOShortcut moshortcut(message);
+
+ if (moshortcut.isValid()) {
if(moshortcut.hasExecutable()) {
processRunner()
.setFromShortcut(moshortcut)
@@ -555,12 +558,16 @@ void OrganizerCore::setCurrentProfile(const QString &profileName)
QString profileDir = profileBaseDir.absoluteFilePath(profileName);
if (!QDir(profileDir).exists()) {
+ log::error("profile '{}' does not exist", profileName);
+
// selected profile doesn't exist. Ensure there is at least one profile,
// then pick any one
createDefaultProfile();
profileDir = profileBaseDir.absoluteFilePath(
profileBaseDir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot).at(0));
+
+ log::error("picked profile '{}' instead", QDir(profileDir).dirName());
}
// Keep the old profile to emit signal-changed: