From 2553e8178f5d94c2272f64d52ee1434be4ff8dc6 Mon Sep 17 00:00:00 2001 From: kh1 Date: Wed, 2 Apr 2014 10:25:02 +0200 Subject: Use qobject_cast where appropriate. Change-Id: I433ce0a9521863f02777baff339c7226327f4628 Reviewed-by: Kai Koehne Reviewed-by: Niels Weber --- src/libs/installer/downloadarchivesjob.cpp | 2 +- src/libs/installer/scriptengine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp index 620eedd60..1a604c0e0 100644 --- a/src/libs/installer/downloadarchivesjob.cpp +++ b/src/libs/installer/downloadarchivesjob.cpp @@ -284,7 +284,7 @@ void DownloadArchivesJob::downloadFailed(const QString &error) void DownloadArchivesJob::finishWithError(const QString &error) { - const FileDownloader *const dl = dynamic_cast (sender()); + const FileDownloader *const dl = qobject_cast (sender()); const QString msg = tr("Could not fetch archives: %1\nError while loading %2"); if (dl != 0) emitFinishedWithError(QInstaller::DownloadError, msg.arg(error, dl->url().toString())); diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index a2fe9f049..87faa2cee 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -75,7 +75,7 @@ QScriptValue qInstallerComponentByName(QScriptContext *context, QScriptEngine *e return check; // well... this is our "this" pointer - PackageManagerCore *const core = dynamic_cast(engine->globalObject() + PackageManagerCore *const core = qobject_cast(engine->globalObject() .property(QLatin1String("installer")).toQObject()); const QString name = context->argument(0).toString(); -- cgit v1.2.3