diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-19 17:54:07 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-19 17:54:07 +0200 |
commit | a4dbb28c4602421a3166e83ffc0011e49e1b37b2 (patch) | |
tree | 0927bf4a7ebd0c47c5d58a8070079a1ade60e040 /examples/svg/embedded/fluidlauncher/demoapplication.cpp | |
parent | 8415b9601b033d43f9267f5a2cada747e8fd0e63 (diff) | |
parent | bf249abee98727d517f52b1126dc7fda8af4e302 (diff) | |
download | qtsvg-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.cpp | 17 |
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() |