summaryrefslogtreecommitdiff
path: root/examples/svg/embedded/fluidlauncher/demoapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/svg/embedded/fluidlauncher/demoapplication.cpp')
-rw-r--r--examples/svg/embedded/fluidlauncher/demoapplication.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/examples/svg/embedded/fluidlauncher/demoapplication.cpp b/examples/svg/embedded/fluidlauncher/demoapplication.cpp
index a01894f..dfba309 100644
--- a/examples/svg/embedded/fluidlauncher/demoapplication.cpp
+++ b/examples/svg/embedded/fluidlauncher/demoapplication.cpp
@@ -48,6 +48,11 @@ DemoApplication::DemoApplication(QString executableName, QString caption, QStrin
else
executablePath = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + executableName);
+#ifdef WIN32
+ if (!executablePath.endsWith(QLatin1String(".exe")))
+ executablePath.append(QLatin1String(".exe"));
+#endif
+
arguments = args;
process.setProcessChannelMode(QProcess::ForwardedChannels);
@@ -69,7 +74,17 @@ void DemoApplication::launch()
QImage DemoApplication::getImage() const
{
- return imagePath.isEmpty() ? QImage() : QImage(imagePath);
+ if (imagePath.isEmpty())
+ return QImage();
+
+ // in local dir?
+ QImage result(imagePath);
+ if (!result.isNull())
+ return result;
+
+ // provided by qrc
+ result = QImage(QString(":/fluidlauncher/%1").arg(imagePath));
+ return result;
}
QString DemoApplication::getCaption()