summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/svg/embedded/fluidlauncher/demoapplication.cpp4
-rw-r--r--examples/svg/embedded/fluidlauncher/demoapplication.h2
-rw-r--r--examples/svg/embedded/fluidlauncher/fluidlauncher.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/examples/svg/embedded/fluidlauncher/demoapplication.cpp b/examples/svg/embedded/fluidlauncher/demoapplication.cpp
index ea7f5d6..a5d288f 100644
--- a/examples/svg/embedded/fluidlauncher/demoapplication.cpp
+++ b/examples/svg/embedded/fluidlauncher/demoapplication.cpp
@@ -75,9 +75,9 @@ void DemoApplication::launch()
process.start(executablePath, arguments);
}
-QImage* DemoApplication::getImage()
+QImage DemoApplication::getImage() const
{
- return new QImage(imagePath);
+ return imagePath.isEmpty() ? QImage() : QImage(imagePath);
}
QString DemoApplication::getCaption()
diff --git a/examples/svg/embedded/fluidlauncher/demoapplication.h b/examples/svg/embedded/fluidlauncher/demoapplication.h
index da12f05..9a1b2ac 100644
--- a/examples/svg/embedded/fluidlauncher/demoapplication.h
+++ b/examples/svg/embedded/fluidlauncher/demoapplication.h
@@ -54,7 +54,7 @@ class DemoApplication : public QObject
public:
DemoApplication(QString executableName, QString caption, QString imageName, QStringList args);
void launch();
- QImage* getImage();
+ QImage getImage() const;
QString getCaption();
public slots:
diff --git a/examples/svg/embedded/fluidlauncher/fluidlauncher.cpp b/examples/svg/embedded/fluidlauncher/fluidlauncher.cpp
index a5af617..81cd14d 100644
--- a/examples/svg/embedded/fluidlauncher/fluidlauncher.cpp
+++ b/examples/svg/embedded/fluidlauncher/fluidlauncher.cpp
@@ -207,7 +207,9 @@ void FluidLauncher::populatePictureFlow()
pictureFlowWidget->setSlideCount(demoList.count());
for (int i=demoList.count()-1; i>=0; --i) {
- pictureFlowWidget->setSlide(i, *(demoList[i]->getImage()));
+ const QImage image = demoList[i]->getImage();
+ if (!image.isNull())
+ pictureFlowWidget->setSlide(i, image);
pictureFlowWidget->setSlideCaption(i, demoList[i]->getCaption());
}