summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-04-02 10:25:02 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-04-03 11:08:24 +0200
commit2553e8178f5d94c2272f64d52ee1434be4ff8dc6 (patch)
tree7f55d6bc294935b5ed9e3c780a8242eca3987f20
parent212de513466eac2991421a4252abdbccf3e2c74e (diff)
Use qobject_cast where appropriate.
Change-Id: I433ce0a9521863f02777baff339c7226327f4628 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp2
-rw-r--r--src/libs/installer/scriptengine.cpp2
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<const FileDownloader*> (sender());
+ const FileDownloader *const dl = qobject_cast<const FileDownloader*> (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<PackageManagerCore*>(engine->globalObject()
+ PackageManagerCore *const core = qobject_cast<PackageManagerCore*>(engine->globalObject()
.property(QLatin1String("installer")).toQObject());
const QString name = context->argument(0).toString();