summaryrefslogtreecommitdiff
path: root/examples/svg/embedded/fluidlauncher/demoapplication.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-19 17:54:07 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-19 17:54:07 +0200
commita4dbb28c4602421a3166e83ffc0011e49e1b37b2 (patch)
tree0927bf4a7ebd0c47c5d58a8070079a1ade60e040 /examples/svg/embedded/fluidlauncher/demoapplication.cpp
parent8415b9601b033d43f9267f5a2cada747e8fd0e63 (diff)
parentbf249abee98727d517f52b1126dc7fda8af4e302 (diff)
downloadqtsvg-a4dbb28c4602421a3166e83ffc0011e49e1b37b2.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I75941126eb0ea28d1190c42e5267c1d6e427a164
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()