summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-09-01 14:00:17 +0200
committerNiels Weber <niels.weber@theqtcompany.com>2015-09-07 10:41:45 +0000
commitcab3405ad2b0d269924a93263298304bff8807eb (patch)
tree2cc70eac08d78376998e8406ed41211b42598449 /src
parent823efa49cc61e91d7deb7b14d0bc05991c142474 (diff)
Missed to rename classes and to update docs and tests.
Change-Id: I2d79ab4094cb9706287d44160543c19b35a66c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp4
-rw-r--r--src/libs/installer/downloadarchivesjob.h2
-rw-r--r--src/libs/installer/metadatajob.cpp14
-rw-r--r--src/libs/installer/metadatajob.h2
-rw-r--r--src/libs/installer/packagemanagercore.cpp6
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp8
-rw-r--r--src/libs/installer/packagemanagercore_p.h6
-rw-r--r--src/libs/installer/packagemanagerpagefactory.h2
-rw-r--r--src/libs/installer/selfrestartoperation.cpp8
-rw-r--r--src/libs/installer/testrepository.cpp12
-rw-r--r--src/libs/installer/testrepository.h2
-rw-r--r--src/libs/kdtools/filedownloaderfactory.cpp2
-rw-r--r--src/libs/kdtools/filedownloaderfactory.h2
-rw-r--r--src/libs/kdtools/genericfactory.cpp24
-rw-r--r--src/libs/kdtools/genericfactory.h12
-rw-r--r--src/libs/kdtools/job.cpp80
-rw-r--r--src/libs/kdtools/job.h16
-rw-r--r--src/libs/kdtools/lockfile.cpp14
-rw-r--r--src/libs/kdtools/lockfile.h12
-rw-r--r--src/libs/kdtools/lockfile_p.h6
-rw-r--r--src/libs/kdtools/lockfile_unix.cpp16
-rw-r--r--src/libs/kdtools/lockfile_win.cpp18
-rw-r--r--src/libs/kdtools/runoncechecker.cpp6
-rw-r--r--src/libs/kdtools/runoncechecker.h12
-rw-r--r--src/libs/kdtools/selfrestarter.cpp20
-rw-r--r--src/libs/kdtools/selfrestarter.h8
-rw-r--r--src/libs/kdtools/updateoperationfactory.h2
-rw-r--r--src/sdk/installerbase.cpp6
-rw-r--r--src/sdk/main.cpp2
-rw-r--r--src/sdk/settingsdialog.cpp2
-rw-r--r--src/sdk/translations/de.ts4
-rw-r--r--src/sdk/translations/en.ts2
-rw-r--r--src/sdk/translations/fr.ts4
-rw-r--r--src/sdk/translations/it.ts4
-rw-r--r--src/sdk/translations/ja.ts4
-rw-r--r--src/sdk/translations/pl.ts4
-rw-r--r--src/sdk/translations/ru.ts4
-rw-r--r--src/sdk/translations/zh_cn.ts4
-rw-r--r--src/sdk/updatechecker.cpp6
39 files changed, 191 insertions, 171 deletions
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 536a8963f..00ee9dd52 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -53,7 +53,7 @@ using namespace KDUpdater;
Creates a new DownloadArchivesJob with \a parent.
*/
DownloadArchivesJob::DownloadArchivesJob(PackageManagerCore *core)
- : KDJob(core)
+ : Job(core)
, m_core(core)
, m_downloader(0)
, m_archivesDownloaded(0)
@@ -242,7 +242,7 @@ void DownloadArchivesJob::registerFile()
void DownloadArchivesJob::downloadCanceled()
{
- emitFinishedWithError(KDJob::Canceled, m_downloader->errorString());
+ emitFinishedWithError(Job::Canceled, m_downloader->errorString());
}
void DownloadArchivesJob::downloadFailed(const QString &error)
diff --git a/src/libs/installer/downloadarchivesjob.h b/src/libs/installer/downloadarchivesjob.h
index e1359de71..a071afadc 100644
--- a/src/libs/installer/downloadarchivesjob.h
+++ b/src/libs/installer/downloadarchivesjob.h
@@ -52,7 +52,7 @@ namespace QInstaller {
class MessageBoxHandler;
class PackageManagerCore;
-class DownloadArchivesJob : public KDJob
+class DownloadArchivesJob : public Job
{
Q_OBJECT
diff --git a/src/libs/installer/metadatajob.cpp b/src/libs/installer/metadatajob.cpp
index bce43fa27..26ec0b02e 100644
--- a/src/libs/installer/metadatajob.cpp
+++ b/src/libs/installer/metadatajob.cpp
@@ -46,7 +46,7 @@
namespace QInstaller {
MetadataJob::MetadataJob(QObject *parent)
- : KDJob(parent)
+ : Job(parent)
, m_core(0)
{
setCapabilities(Cancelable);
@@ -72,7 +72,7 @@ void MetadataJob::doStart()
{
reset();
if (!m_core) {
- emitFinishedWithError(KDJob::Canceled, tr("Missing package manager core engine."));
+ emitFinishedWithError(Job::Canceled, tr("Missing package manager core engine."));
return; // We can't do anything here without core, so avoid tons of !m_core checks.
}
@@ -109,7 +109,7 @@ void MetadataJob::doStart()
void MetadataJob::doCancel()
{
reset();
- emitFinishedWithError(KDJob::Canceled, tr("Meta data download canceled."));
+ emitFinishedWithError(Job::Canceled, tr("Meta data download canceled."));
}
void MetadataJob::xmlTaskFinished()
@@ -179,7 +179,7 @@ void MetadataJob::xmlTaskFinished()
emitFinishedWithError(QInstaller::DownloadError, tr("Unknown exception during download."));
}
- if (error() != KDJob::NoError)
+ if (error() != Job::NoError)
return;
if (status == XmlDownloadSuccess) {
@@ -212,7 +212,7 @@ void MetadataJob::unzipTaskFinished()
emitFinishedWithError(QInstaller::DownloadError, tr("Unknown exception during extracting."));
}
- if (error() != KDJob::NoError)
+ if (error() != Job::NoError)
return;
delete m_unzipTasks.value(watcher);
@@ -270,7 +270,7 @@ void MetadataJob::reset()
m_packages.clear();
m_metadata.clear();
- setError(KDJob::NoError);
+ setError(Job::NoError);
setErrorString(QString());
setCapabilities(Cancelable);
@@ -291,7 +291,7 @@ void MetadataJob::reset()
MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &results)
{
foreach (const FileTaskResult &result, results) {
- if (error() != KDJob::NoError)
+ if (error() != Job::NoError)
return XmlDownloadFailure;
Metadata metadata;
diff --git a/src/libs/installer/metadatajob.h b/src/libs/installer/metadatajob.h
index 4369c5566..fa9675bf2 100644
--- a/src/libs/installer/metadatajob.h
+++ b/src/libs/installer/metadatajob.h
@@ -52,7 +52,7 @@ struct Metadata
Repository repository;
};
-class INSTALLER_EXPORT MetadataJob : public KDJob
+class INSTALLER_EXPORT MetadataJob : public Job
{
Q_OBJECT
Q_DISABLE_COPY(MetadataJob)
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index c5cfeb5e9..1f32b9119 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -639,7 +639,7 @@ int PackageManagerCore::downloadNeededArchives(double partProgressSize)
DownloadArchivesJob archivesJob(this);
archivesJob.setAutoDelete(false);
archivesJob.setArchivesToDownload(archivesToDownload);
- connect(this, &PackageManagerCore::installationInterrupted, &archivesJob, &KDJob::cancel);
+ connect(this, &PackageManagerCore::installationInterrupted, &archivesJob, &Job::cancel);
connect(&archivesJob, &DownloadArchivesJob::outputTextChanged,
ProgressCoordinator::instance(), &ProgressCoordinator::emitLabelAndDetailTextChanged);
connect(&archivesJob, &DownloadArchivesJob::downloadStatusChanged,
@@ -651,9 +651,9 @@ int PackageManagerCore::downloadNeededArchives(double partProgressSize)
archivesJob.start();
archivesJob.waitForFinished();
- if (archivesJob.error() == KDJob::Canceled)
+ if (archivesJob.error() == Job::Canceled)
interrupt();
- else if (archivesJob.error() != KDJob::NoError)
+ else if (archivesJob.error() != Job::NoError)
throw Error(archivesJob.errorString());
if (d->statusCanceledOrFailed())
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index cfa7574ad..e070ba87a 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -177,7 +177,7 @@ static void deferredRename(const QString &oldName, const QString &newName, bool
#else
QFile::remove(newName);
QFile::rename(oldName, newName);
- KDSelfRestarter::setRestartOnQuit(restart);
+ SelfRestarter::setRestartOnQuit(restart);
#endif
}
@@ -582,8 +582,8 @@ void PackageManagerCorePrivate::initialize(const QHash<QString, QString> &params
m_metadataJob.disconnect();
m_metadataJob.setAutoDelete(false);
m_metadataJob.setPackageManagerCore(m_core);
- connect(&m_metadataJob, &KDJob::infoMessage, this, &PackageManagerCorePrivate::infoMessage);
- connect(&m_metadataJob, &KDJob::progress, this, &PackageManagerCorePrivate::infoProgress);
+ connect(&m_metadataJob, &Job::infoMessage, this, &PackageManagerCorePrivate::infoMessage);
+ connect(&m_metadataJob, &Job::progress, this, &PackageManagerCorePrivate::infoProgress);
KDUpdater::FileDownloaderFactory::instance().setProxyFactory(m_core->proxyFactory());
}
@@ -2181,7 +2181,7 @@ bool PackageManagerCorePrivate::fetchMetaInformationFromRepositories()
return m_repoFetched;
}
- if (m_metadataJob.error() != KDJob::NoError) {
+ if (m_metadataJob.error() != Job::NoError) {
switch (m_metadataJob.error()) {
case QInstaller::UserIgnoreError:
break; // we can simply ignore this error, the user knows about it
diff --git a/src/libs/installer/packagemanagercore_p.h b/src/libs/installer/packagemanagercore_p.h
index 62a36f30f..abfee9700 100644
--- a/src/libs/installer/packagemanagercore_p.h
+++ b/src/libs/installer/packagemanagercore_p.h
@@ -47,7 +47,7 @@
#include <QObject>
-class KDJob;
+class Job;
QT_FORWARD_DECLARE_CLASS(QFile)
QT_FORWARD_DECLARE_CLASS(QFileDevice)
@@ -206,10 +206,10 @@ public:
bool m_dependsOnLocalInstallerBinary;
private slots:
- void infoMessage(KDJob *, const QString &message) {
+ void infoMessage(Job *, const QString &message) {
emit m_core->metaJobInfoMessage(message);
}
- void infoProgress(KDJob *, quint64 progress, quint64) {
+ void infoProgress(Job *, quint64 progress, quint64) {
emit m_core->metaJobProgress(progress);
}
diff --git a/src/libs/installer/packagemanagerpagefactory.h b/src/libs/installer/packagemanagerpagefactory.h
index 928fc53bc..fbf4f3426 100644
--- a/src/libs/installer/packagemanagerpagefactory.h
+++ b/src/libs/installer/packagemanagerpagefactory.h
@@ -43,7 +43,7 @@ namespace QInstaller {
class PackageManagerCore;
class PackageManagerPage;
-class INSTALLER_EXPORT PackageManagerPageFactory : public KDGenericFactory<PackageManagerPage, int,
+class INSTALLER_EXPORT PackageManagerPageFactory : public GenericFactory<PackageManagerPage, int,
PackageManagerCore*>
{
Q_DISABLE_COPY(PackageManagerPageFactory)
diff --git a/src/libs/installer/selfrestartoperation.cpp b/src/libs/installer/selfrestartoperation.cpp
index 7b0358b86..ef520a8ac 100644
--- a/src/libs/installer/selfrestartoperation.cpp
+++ b/src/libs/installer/selfrestartoperation.cpp
@@ -47,7 +47,7 @@ SelfRestartOperation::SelfRestartOperation(PackageManagerCore *core)
void SelfRestartOperation::backup()
{
- setValue(QLatin1String("PreviousSelfRestart"), KDSelfRestarter::restartOnQuit());
+ setValue(QLatin1String("PreviousSelfRestart"), SelfRestarter::restartOnQuit());
}
bool SelfRestartOperation::performOperation()
@@ -70,13 +70,13 @@ bool SelfRestartOperation::performOperation()
setErrorString(tr("Self Restart: Invalid arguments"));
return false;
}
- KDSelfRestarter::setRestartOnQuit(true);
- return KDSelfRestarter::restartOnQuit();
+ SelfRestarter::setRestartOnQuit(true);
+ return SelfRestarter::restartOnQuit();
}
bool SelfRestartOperation::undoOperation()
{
- KDSelfRestarter::setRestartOnQuit(value(QLatin1String("PreviousSelfRestart")).toBool());
+ SelfRestarter::setRestartOnQuit(value(QLatin1String("PreviousSelfRestart")).toBool());
return true;
}
diff --git a/src/libs/installer/testrepository.cpp b/src/libs/installer/testrepository.cpp
index 77ceed260..f99313deb 100644
--- a/src/libs/installer/testrepository.cpp
+++ b/src/libs/installer/testrepository.cpp
@@ -43,7 +43,7 @@
namespace QInstaller {
TestRepository::TestRepository(PackageManagerCore *parent)
- : KDJob(parent)
+ : Job(parent)
, m_core(parent)
{
setAutoDelete(false);
@@ -73,7 +73,7 @@ void TestRepository::doStart()
{
reset();
if (!m_core) {
- emitFinishedWithError(KDJob::Canceled, tr("Missing package manager core engine."));
+ emitFinishedWithError(Job::Canceled, tr("Missing package manager core engine."));
return; // We can't do anything here without core, so avoid tons of !m_core checks.
}
@@ -101,19 +101,19 @@ void TestRepository::doStart()
void TestRepository::doCancel()
{
reset();
- emitFinishedWithError(KDJob::Canceled, tr("Download canceled."));
+ emitFinishedWithError(Job::Canceled, tr("Download canceled."));
}
void TestRepository::onTimeout()
{
reset();
- emitFinishedWithError(KDJob::Canceled, tr("Timeout while testing repository \"%1\".")
+ emitFinishedWithError(Job::Canceled, tr("Timeout while testing repository \"%1\".")
.arg(m_repository.displayname()));
}
void TestRepository::downloadCompleted()
{
- if (error() != KDJob::NoError)
+ if (error() != Job::NoError)
return;
try {
@@ -128,7 +128,7 @@ void TestRepository::downloadCompleted()
emitFinishedWithError(QInstaller::InvalidUpdatesXml,
tr("Cannot parse Updates.xml: %1").arg(errorMsg));
} else {
- emitFinishedWithError(KDJob::NoError, QString(/*Success*/)); // OPK
+ emitFinishedWithError(Job::NoError, QString(/*Success*/)); // OPK
}
} else {
emitFinishedWithError(QInstaller::DownloadError,
diff --git a/src/libs/installer/testrepository.h b/src/libs/installer/testrepository.h
index 4116f1967..974f05c1a 100644
--- a/src/libs/installer/testrepository.h
+++ b/src/libs/installer/testrepository.h
@@ -45,7 +45,7 @@ namespace QInstaller {
class PackageManagerCore;
-class INSTALLER_EXPORT TestRepository : public KDJob
+class INSTALLER_EXPORT TestRepository : public Job
{
Q_OBJECT
Q_DISABLE_COPY(TestRepository)
diff --git a/src/libs/kdtools/filedownloaderfactory.cpp b/src/libs/kdtools/filedownloaderfactory.cpp
index 2581aa11f..94272b550 100644
--- a/src/libs/kdtools/filedownloaderfactory.cpp
+++ b/src/libs/kdtools/filedownloaderfactory.cpp
@@ -156,7 +156,7 @@ bool FileDownloaderFactory::isSupportedScheme(const QString &scheme)
FileDownloader *FileDownloaderFactory::create(const QString &scheme, QObject *parent) const
{
FileDownloader *downloader =
- KDGenericFactory<FileDownloader, QString, QObject*>::create(scheme, parent);
+ GenericFactory<FileDownloader, QString, QObject*>::create(scheme, parent);
if (downloader != 0) {
downloader->setFollowRedirects(d->m_followRedirects);
downloader->setIgnoreSslErrors(d->m_ignoreSslErrors);
diff --git a/src/libs/kdtools/filedownloaderfactory.h b/src/libs/kdtools/filedownloaderfactory.h
index cc1ef66a5..e81ad780b 100644
--- a/src/libs/kdtools/filedownloaderfactory.h
+++ b/src/libs/kdtools/filedownloaderfactory.h
@@ -58,7 +58,7 @@ public:
virtual FileDownloaderProxyFactory *clone() const = 0;
};
-class KDTOOLS_EXPORT FileDownloaderFactory : public KDGenericFactory<FileDownloader, QString,
+class KDTOOLS_EXPORT FileDownloaderFactory : public GenericFactory<FileDownloader, QString,
QObject*>
{
Q_DISABLE_COPY(FileDownloaderFactory)
diff --git a/src/libs/kdtools/genericfactory.cpp b/src/libs/kdtools/genericfactory.cpp
index 5459c0604..e29a8da4a 100644
--- a/src/libs/kdtools/genericfactory.cpp
+++ b/src/libs/kdtools/genericfactory.cpp
@@ -47,10 +47,10 @@
/*!
\inmodule kdupdater
- \class KDGenericFactory
- \brief The KDGenericFactory class implements a template-based generic factory.
+ \class GenericFactory
+ \brief The GenericFactory class implements a template-based generic factory.
- KDGenericFactory is an implementation of the factory pattern. It can be used to produce
+ GenericFactory is an implementation of the factory pattern. It can be used to produce
instances of different classes having a common superclass \c BASE. The user of the factory
registers those producible classes in the factory by using the identifier \c IDENTIFIER. That
identifier can then be used to produce as many instances of the registered product as the
@@ -63,10 +63,10 @@
If a class derived from BASE does not contain a SIGNATURE matching the registered one for the
constructor or the generator function, it is not possible to create instances of it using one
- instance of KDGenericFactory subclass. In that case, more than one KDGenericFactory subclass
+ instance of GenericFactory subclass. In that case, more than one GenericFactory subclass
and instance are needed.
- It is possible to register a subclass of BASE inside an instance of KDGenericFactory subclass
+ It is possible to register a subclass of BASE inside an instance of GenericFactory subclass
using the registerProduct() function. At least one of the following conditions needs to be met:
\list
@@ -82,25 +82,25 @@
*/
/*!
- \fn KDGenericFactory::KDGenericFactory()
+ \fn GenericFactory::GenericFactory()
Creates the generic factory.
*/
/*!
- \fn KDGenericFactory::~KDGenericFactory()
+ \fn GenericFactory::~GenericFactory()
Destroys the generic factory.
*/
/*!
- \typedef KDGenericFactory::FactoryFunction
+ \typedef GenericFactory::FactoryFunction
This typedef defines a factory function producing an object of type BASE.
*/
/*!
- \fn void KDGenericFactory::registerProduct(const IDENTIFIER &id)
+ \fn void GenericFactory::registerProduct(const IDENTIFIER &id)
Registers a type DERIVED, identified by \a id in the factory. Any type with the same id gets
unregistered.
@@ -108,20 +108,20 @@
/*!
\overload
- \fn void KDGenericFactory::registerProduct(const IDENTIFIER &id, FactoryFunction func)
+ \fn void GenericFactory::registerProduct(const IDENTIFIER &id, FactoryFunction func)
Registers a function \a func that can create the type DERIVED, identified by \a id in the
factory. Any type with the same id gets unregistered.
*/
/*!
- \fn bool KDGenericFactory::containsProduct(const IDENTIFIER &id) const
+ \fn bool GenericFactory::containsProduct(const IDENTIFIER &id) const
Returns \c true if the factory contains a type with the \a id; otherwise returns false.
*/
/*!
- \fn BASE *KDGenericFactory::create(const IDENTIFIER &id, ARGUMENTS... args) const
+ \fn BASE *GenericFactory::create(const IDENTIFIER &id, ARGUMENTS... args) const
Creates and returns the type identified by \a id, but automatically upcasted to BASE. Ownership
of the type is transferred to the caller.
diff --git a/src/libs/kdtools/genericfactory.h b/src/libs/kdtools/genericfactory.h
index 9b9b97275..8588ada5e 100644
--- a/src/libs/kdtools/genericfactory.h
+++ b/src/libs/kdtools/genericfactory.h
@@ -40,17 +40,17 @@
#include <QtCore/QHash>
template <typename BASE, typename IDENTIFIER = QString, typename... ARGUMENTS>
-class KDGenericFactory
+class GenericFactory
{
public:
- virtual ~KDGenericFactory() {}
+ virtual ~GenericFactory() {}
typedef BASE *(*FactoryFunction)(ARGUMENTS...);
template <typename DERIVED>
void registerProduct(const IDENTIFIER &id)
{
- m_hash.insert(id, &KDGenericFactory::create<DERIVED>);
+ m_hash.insert(id, &GenericFactory::create<DERIVED>);
}
void registerProduct(const IDENTIFIER &id, FactoryFunction func)
@@ -72,7 +72,7 @@ public:
}
protected:
- KDGenericFactory() = default;
+ GenericFactory() = default;
private:
template <typename DERIVED>
@@ -81,8 +81,8 @@ private:
return new DERIVED(std::forward<ARGUMENTS>(args)...);
}
- KDGenericFactory(const KDGenericFactory &) = delete;
- KDGenericFactory &operator=(const KDGenericFactory &) = delete;
+ GenericFactory(const GenericFactory &) = delete;
+ GenericFactory &operator=(const GenericFactory &) = delete;
private:
QHash<IDENTIFIER, FactoryFunction> m_hash;
diff --git a/src/libs/kdtools/job.cpp b/src/libs/kdtools/job.cpp
index ad2472ae3..3cf273e4f 100644
--- a/src/libs/kdtools/job.cpp
+++ b/src/libs/kdtools/job.cpp
@@ -34,28 +34,28 @@
#include "job.h"
-#include <QtCore/QDebug>
-#include <QtCore/QEventLoop>
-#include <QtCore/QTimer>
+#include <QDebug>
+#include <QEventLoop>
+#include <QTimer>
-// -- KDJob::Private
+// -- Job::Private
-class KDJob::Private
+class Job::Private
{
- KDJob *const q;
+ Job *const q;
public:
- explicit Private(KDJob *qq)
+ explicit Private(Job *qq)
: q(qq)
- , error(KDJob::NoError)
- , caps(KDJob::NoCapabilities)
+ , error(Job::NoError)
+ , caps(Job::NoCapabilities)
, autoDelete(true)
, totalAmount(100)
, processedAmount(0)
, m_timeout(-1)
{
- connect(&m_timer, &QTimer::timeout, q, &KDJob::cancel);
+ connect(&m_timer, &QTimer::timeout, q, &Job::cancel);
}
~Private()
@@ -84,7 +84,7 @@ public:
int error;
QString errorString;
- KDJob::Capabilities caps;
+ Job::Capabilities caps;
bool autoDelete;
quint64 totalAmount;
quint64 processedAmount;
@@ -93,93 +93,93 @@ public:
};
-// -- KDJob
+// -- Job
-KDJob::KDJob(QObject *parent)
+Job::Job(QObject *parent)
: QObject(parent),
d(new Private(this))
{
- connect(this, &KDJob::finished, this, &KDJob::onFinished);
+ connect(this, &Job::finished, this, &Job::onFinished);
}
-KDJob::~KDJob()
+Job::~Job()
{
delete d;
}
-bool KDJob::autoDelete() const
+bool Job::autoDelete() const
{
return d->autoDelete;
}
-void KDJob::setAutoDelete(bool autoDelete)
+void Job::setAutoDelete(bool autoDelete)
{
d->autoDelete = autoDelete;
}
-int KDJob::error() const
+int Job::error() const
{
return d->error;
}
-QString KDJob::errorString() const
+QString Job::errorString() const
{
return d->errorString;
}
-void KDJob::emitFinished()
+void Job::emitFinished()
{
emit finished(this);
}
-void KDJob::emitFinishedWithError(int error, const QString &errorString)
+void Job::emitFinishedWithError(int error, const QString &errorString)
{
d->error = error;
d->errorString = errorString;
emitFinished();
}
-void KDJob::setError(int error)
+void Job::setError(int error)
{
d->error = error;
}
-void KDJob::setErrorString(const QString &errorString)
+void Job::setErrorString(const QString &errorString)
{
d->errorString = errorString;
}
-void KDJob::waitForStarted()
+void Job::waitForStarted()
{
- d->waitForSignal(SIGNAL(started(KDJob*)));
+ d->waitForSignal(SIGNAL(started(Job*)));
}
-void KDJob::waitForFinished()
+void Job::waitForFinished()
{
- d->waitForSignal(SIGNAL(finished(KDJob*)));
+ d->waitForSignal(SIGNAL(finished(Job*)));
}
-KDJob::Capabilities KDJob::capabilities() const
+Job::Capabilities Job::capabilities() const
{
return d->caps;
}
-bool KDJob::hasCapability(Capability c) const
+bool Job::hasCapability(Capability c) const
{
return d->caps.testFlag(c);
}
-void KDJob::setCapabilities(Capabilities c)
+void Job::setCapabilities(Capabilities c)
{
d->caps = c;
}
-void KDJob::start()
+void Job::start()
{
QMetaObject::invokeMethod(this, "delayedStart", Qt::QueuedConnection);
}
-void KDJob::cancel()
+void Job::cancel()
{
if (d->caps & Cancelable) {
doCancel();
@@ -193,17 +193,17 @@ void KDJob::cancel()
}
}
-quint64 KDJob::totalAmount() const
+quint64 Job::totalAmount() const
{
return d->totalAmount;
}
-quint64 KDJob::processedAmount() const
+quint64 Job::processedAmount() const
{
return d->processedAmount;
}
-void KDJob::setTotalAmount(quint64 amount)
+void Job::setTotalAmount(quint64 amount)
{
if (d->totalAmount == amount)
return;
@@ -215,22 +215,22 @@ void KDJob::setTotalAmount(quint64 amount)
Returns the timeout in milliseconds before the job's cancel slot gets triggered. A return value
of -1 means there is currently no timeout used for the job.
*/
-int KDJob::timeout() const
+int Job::timeout() const
{
return d->m_timeout;
}
/*!
Sets the timeout in \a milliseconds before the job's cancel slot gets triggered. \note Only jobs
- that have the \c KDJob::Cancelable capability can be canceled by a timeout. A value of -1 will
+ that have the \c Job::Cancelable capability can be canceled by a timeout. A value of -1 will
stop the timeout mechanism.
*/
-void KDJob::setTimeout(int milliseconds)
+void Job::setTimeout(int milliseconds)
{
d->m_timeout = milliseconds;
}
-void KDJob::setProcessedAmount(quint64 amount)
+void Job::setProcessedAmount(quint64 amount)
{
if (d->processedAmount == amount)
return;
@@ -238,7 +238,7 @@ void KDJob::setProcessedAmount(quint64 amount)
emit progress(this, d->processedAmount, d->totalAmount);
}
-void KDJob::onFinished()
+void Job::onFinished()
{
d->m_timer.stop();
if (d->autoDelete)
diff --git a/src/libs/kdtools/job.h b/src/libs/kdtools/job.h
index 1da87ae6b..3b41fae64 100644
--- a/src/libs/kdtools/job.h
+++ b/src/libs/kdtools/job.h
@@ -39,7 +39,7 @@
#include <QtCore/QObject>
-class KDTOOLS_EXPORT KDJob : public QObject
+class KDTOOLS_EXPORT Job : public QObject
{
Q_OBJECT
class Private;
@@ -48,8 +48,8 @@ class KDTOOLS_EXPORT KDJob : public QObject
Q_PROPERTY(bool autoDelete READ autoDelete WRITE setAutoDelete)
public:
- explicit KDJob(QObject *parent = 0);
- ~KDJob();
+ explicit Job(QObject *parent = 0);
+ ~Job();
enum Error {
NoError = 0,
@@ -87,11 +87,11 @@ public Q_SLOTS:
void cancel();
Q_SIGNALS:
- void started(KDJob *job);
- void finished(KDJob *job);
+ void started(Job *job);
+ void finished(Job *job);
- void infoMessage(KDJob *job, const QString &message);
- void progress(KDJob *job, quint64 processed, quint64 total);
+ void infoMessage(Job *job, const QString &message);
+ void progress(Job *job, quint64 processed, quint64 total);
protected:
virtual void doStart() = 0;
@@ -116,6 +116,6 @@ private:
Q_PRIVATE_SLOT(d, void delayedStart())
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(KDJob::Capabilities)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Job::Capabilities)
#endif // JOB_H
diff --git a/src/libs/kdtools/lockfile.cpp b/src/libs/kdtools/lockfile.cpp
index 5923dc07e..3e5c0a644 100644
--- a/src/libs/kdtools/lockfile.cpp
+++ b/src/libs/kdtools/lockfile.cpp
@@ -36,27 +36,31 @@
#include "lockfile.h"
#include "lockfile_p.h"
-KDLockFile::KDLockFile(const QString &name)
+namespace KDUpdater {
+
+LockFile::LockFile(const QString &name)
: d(new Private(name))
{
}
-KDLockFile::~KDLockFile()
+LockFile::~LockFile()
{
delete d;
}
-bool KDLockFile::lock()
+bool LockFile::lock()
{
return d->lock();
}
-QString KDLockFile::errorString() const
+QString LockFile::errorString() const
{
return d->errorString;
}
-bool KDLockFile::unlock()
+bool LockFile::unlock()
{
return d->unlock();
}
+
+} // namespace KDUpdater
diff --git a/src/libs/kdtools/lockfile.h b/src/libs/kdtools/lockfile.h
index ea008f115..d142726fb 100644
--- a/src/libs/kdtools/lockfile.h
+++ b/src/libs/kdtools/lockfile.h
@@ -38,13 +38,15 @@
#include "kdtoolsglobal.h"
-class KDTOOLS_EXPORT KDLockFile
+namespace KDUpdater {
+
+class KDTOOLS_EXPORT LockFile
{
- Q_DISABLE_COPY(KDLockFile)
+ Q_DISABLE_COPY(LockFile)
public:
- explicit KDLockFile(const QString &name);
- ~KDLockFile();
+ explicit LockFile(const QString &name);
+ ~LockFile();
QString errorString() const;
@@ -56,4 +58,6 @@ private:
Private *d;
};
+} // namespace KDUpdater
+
#endif // LOCKFILE_H
diff --git a/src/libs/kdtools/lockfile_p.h b/src/libs/kdtools/lockfile_p.h
index 81a9d0038..3a55f9f36 100644
--- a/src/libs/kdtools/lockfile_p.h
+++ b/src/libs/kdtools/lockfile_p.h
@@ -44,7 +44,9 @@
# include <qt_windows.h>
#endif
-class KDLockFile::Private
+namespace KDUpdater {
+
+class LockFile::Private
{
public:
explicit Private(const QString& name)
@@ -68,4 +70,6 @@ private:
bool locked;
};
+} // namespace KDUpdater
+
#endif // LOCKFILE_P_H
diff --git a/src/libs/kdtools/lockfile_unix.cpp b/src/libs/kdtools/lockfile_unix.cpp
index d37fc8fb1..a1c8b7056 100644
--- a/src/libs/kdtools/lockfile_unix.cpp
+++ b/src/libs/kdtools/lockfile_unix.cpp
@@ -42,7 +42,9 @@
#include <sys/file.h>
#include <unistd.h>
-bool KDLockFile::Private::lock()
+namespace KDUpdater {
+
+bool LockFile::Private::lock()
{
if (locked)
return true;
@@ -51,7 +53,7 @@ bool KDLockFile::Private::lock()
errno = 0;
handle = open(filename.toLatin1().constData(), O_CREAT | O_RDWR | O_NONBLOCK, 0600);
if (handle == -1) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot create lock file \"%1\": "
+ errorString = QCoreApplication::translate("LockFile", "Cannot create lock file \"%1\": "
"%2").arg(QDir::toNativeSeparators(filename), QString::fromLocal8Bit(strerror(errno)));
return false;
}
@@ -62,7 +64,7 @@ bool KDLockFile::Private::lock()
while (written < data.size()) {
const qint64 n = write(handle, data.constData() + written, data.size() - written);
if (n < 0) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot write PID to lock "
+ errorString = QCoreApplication::translate("LockFile", "Cannot write PID to lock "
"file \"%1\": %2").arg(QDir::toNativeSeparators(filename), QString::fromLocal8Bit(strerror(errno)));
return false;
}
@@ -71,13 +73,13 @@ bool KDLockFile::Private::lock()
errno = 0;
locked = flock(handle, LOCK_NB | LOCK_EX) != -1;
if (!locked) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot obtain the lock for "
+ errorString = QCoreApplication::translate("LockFile", "Cannot obtain the lock for "
"file \"%1\": %2").arg(QDir::toNativeSeparators(filename), QString::fromLocal8Bit(strerror(errno)));
}
return locked;
}
-bool KDLockFile::Private::unlock()
+bool LockFile::Private::unlock()
{
errorString.clear();
if (!locked)
@@ -86,10 +88,12 @@ bool KDLockFile::Private::unlock()
errno = 0;
locked = flock(handle, LOCK_UN | LOCK_NB) == -1;
if (locked) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot release the lock for "
+ errorString = QCoreApplication::translate("LockFile", "Cannot release the lock for "
"file \"%1\": %2").arg(QDir::toNativeSeparators(filename), QString::fromLocal8Bit(strerror(errno)));
} else {
unlink(filename.toLatin1());
}
return !locked;
}
+
+} // namespace KDUpdater
diff --git a/src/libs/kdtools/lockfile_win.cpp b/src/libs/kdtools/lockfile_win.cpp
index 137cf3cf4..9c912ffc4 100644
--- a/src/libs/kdtools/lockfile_win.cpp
+++ b/src/libs/kdtools/lockfile_win.cpp
@@ -42,7 +42,9 @@
#include <QDir>
#include <QFileInfo>
-bool KDLockFile::Private::lock()
+namespace KDUpdater {
+
+bool LockFile::Private::lock()
{
if (locked)
return locked;
@@ -53,7 +55,7 @@ bool KDLockFile::Private::lock()
FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, NULL);
if (handle == INVALID_HANDLE_VALUE) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot create lock file \"%1\": "
+ errorString = QCoreApplication::translate("LockFile", "Cannot create lock file \"%1\": "
"%2").arg(QDir::toNativeSeparators(filename), QInstaller::windowsErrorString(GetLastError()));
return false;
}
@@ -61,14 +63,14 @@ bool KDLockFile::Private::lock()
DWORD bytesWritten;
const QByteArray pid = QString::number(QCoreApplication::applicationPid()).toLatin1();
if (!WriteFile(handle, pid.data(), pid.size(), &bytesWritten, NULL)) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot write PID to lock file "
+ errorString = QCoreApplication::translate("LockFile", "Cannot write PID to lock file "
"\"%1\": %2").arg(QDir::toNativeSeparators(filename), QInstaller::windowsErrorString(GetLastError()));
return false;
}
FlushFileBuffers(handle);
- if (!LockFile(handle, 0, 0, QFileInfo(filename).size(), 0)) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot obtain the lock for "
+ if (!::LockFile(handle, 0, 0, QFileInfo(filename).size(), 0)) {
+ errorString = QCoreApplication::translate("LockFile", "Cannot obtain the lock for "
"file \"%1\": %2").arg(QDir::toNativeSeparators(filename), QInstaller::windowsErrorString(GetLastError()));
} else {
locked = true;
@@ -76,14 +78,14 @@ bool KDLockFile::Private::lock()
return locked;
}
-bool KDLockFile::Private::unlock()
+bool LockFile::Private::unlock()
{
errorString.clear();
if (!locked)
return true;
if (!UnlockFile(handle, 0, 0, QFileInfo(filename).size(), 0)) {
- errorString = QCoreApplication::translate("KDLockFile", "Cannot release the lock for "
+ errorString = QCoreApplication::translate("LockFile", "Cannot release the lock for "
"file \"%1\": %2").arg(QDir::toNativeSeparators(filename), QInstaller::windowsErrorString(GetLastError()));
} else {
locked = false;
@@ -91,3 +93,5 @@ bool KDLockFile::Private::unlock()
}
return !locked;
}
+
+} // namespace KDUpdater
diff --git a/src/libs/kdtools/runoncechecker.cpp b/src/libs/kdtools/runoncechecker.cpp
index 741708a69..59bff9056 100644
--- a/src/libs/kdtools/runoncechecker.cpp
+++ b/src/libs/kdtools/runoncechecker.cpp
@@ -47,12 +47,12 @@
using namespace KDUpdater;
-KDRunOnceChecker::KDRunOnceChecker(const QString &filename)
+RunOnceChecker::RunOnceChecker(const QString &filename)
: m_lockfile(filename)
{
}
-KDRunOnceChecker::~KDRunOnceChecker()
+RunOnceChecker::~RunOnceChecker()
{
if (!m_lockfile.unlock())
qWarning().noquote() << m_lockfile.errorString();
@@ -91,7 +91,7 @@ private:
QString m_name;
};
-bool KDRunOnceChecker::isRunning(KDRunOnceChecker::ConditionFlags flags)
+bool RunOnceChecker::isRunning(RunOnceChecker::ConditionFlags flags)
{
if (flags.testFlag(ConditionFlag::ProcessList)) {
const QList<ProcessInfo> allProcesses = runningProcesses();
diff --git a/src/libs/kdtools/runoncechecker.h b/src/libs/kdtools/runoncechecker.h
index 2c1c4c0e0..2fe49fe8d 100644
--- a/src/libs/kdtools/runoncechecker.h
+++ b/src/libs/kdtools/runoncechecker.h
@@ -40,9 +40,9 @@
#include <QString>
-class KDTOOLS_EXPORT KDRunOnceChecker
+class KDTOOLS_EXPORT RunOnceChecker
{
- Q_DISABLE_COPY(KDRunOnceChecker)
+ Q_DISABLE_COPY(RunOnceChecker)
public:
enum struct ConditionFlag {
@@ -51,13 +51,13 @@ public:
};
Q_DECLARE_FLAGS(ConditionFlags, ConditionFlag)
- explicit KDRunOnceChecker(const QString &filename = QString());
- ~KDRunOnceChecker();
+ explicit RunOnceChecker(const QString &filename = QString());
+ ~RunOnceChecker();
- bool isRunning(KDRunOnceChecker::ConditionFlags flags);
+ bool isRunning(RunOnceChecker::ConditionFlags flags);
private:
- KDLockFile m_lockfile;
+ KDUpdater::LockFile m_lockfile;
};
#endif // RUNONCECHECKER_H
diff --git a/src/libs/kdtools/selfrestarter.cpp b/src/libs/kdtools/selfrestarter.cpp
index 915f55c43..6477d7f8b 100644
--- a/src/libs/kdtools/selfrestarter.cpp
+++ b/src/libs/kdtools/selfrestarter.cpp
@@ -38,7 +38,7 @@
#include <QtCore/QDir>
#include <QtCore/QProcess>
-class KDSelfRestarter::Private
+class SelfRestarter::Private
{
public:
Private(int argc, char *argv[])
@@ -67,33 +67,33 @@ public:
QStringList args;
bool restartOnQuit;
QString workingPath;
- static KDSelfRestarter *instance;
+ static SelfRestarter *instance;
};
-KDSelfRestarter *KDSelfRestarter::Private::instance = 0;
+SelfRestarter *SelfRestarter::Private::instance = 0;
-KDSelfRestarter::KDSelfRestarter(int argc, char *argv[])
+SelfRestarter::SelfRestarter(int argc, char *argv[])
: d(new Private(argc, argv))
{
- Q_ASSERT_X(!Private::instance, Q_FUNC_INFO, "Cannot create more than one KDSelfRestarter instance");
+ Q_ASSERT_X(!Private::instance, Q_FUNC_INFO, "Cannot create more than one SelfRestarter instance");
Private::instance = this;
}
-KDSelfRestarter::~KDSelfRestarter()
+SelfRestarter::~SelfRestarter()
{
- Q_ASSERT_X(Private::instance == this, Q_FUNC_INFO, "Cannot create more than one KDSelfRestarter instance");
+ Q_ASSERT_X(Private::instance == this, Q_FUNC_INFO, "Cannot create more than one SelfRestarter instance");
delete d;
Private::instance = 0;
}
-void KDSelfRestarter::setRestartOnQuit(bool restart)
+void SelfRestarter::setRestartOnQuit(bool restart)
{
- Q_ASSERT_X(Private::instance, Q_FUNC_INFO, "KDSelfRestarter instance must be created in main()");
+ Q_ASSERT_X(Private::instance, Q_FUNC_INFO, "SelfRestarter instance must be created in main()");
if (Private::instance)
Private::instance->d->restartOnQuit = restart;
}
-bool KDSelfRestarter::restartOnQuit()
+bool SelfRestarter::restartOnQuit()
{
return Private::instance ? Private::instance->d->restartOnQuit : false;
}
diff --git a/src/libs/kdtools/selfrestarter.h b/src/libs/kdtools/selfrestarter.h
index 4d532b2ec..2819be198 100644
--- a/src/libs/kdtools/selfrestarter.h
+++ b/src/libs/kdtools/selfrestarter.h
@@ -37,17 +37,17 @@
#include "kdtoolsglobal.h"
-class KDTOOLS_EXPORT KDSelfRestarter
+class KDTOOLS_EXPORT SelfRestarter
{
public:
- KDSelfRestarter(int argc, char *argv[]);
- ~KDSelfRestarter();
+ SelfRestarter(int argc, char *argv[]);
+ ~SelfRestarter();
static bool restartOnQuit();
static void setRestartOnQuit(bool restart);
private:
- Q_DISABLE_COPY(KDSelfRestarter)
+ Q_DISABLE_COPY(SelfRestarter)
class Private;
Private *d;
};
diff --git a/src/libs/kdtools/updateoperationfactory.h b/src/libs/kdtools/updateoperationfactory.h
index e790a66ea..87519debb 100644
--- a/src/libs/kdtools/updateoperationfactory.h
+++ b/src/libs/kdtools/updateoperationfactory.h
@@ -47,7 +47,7 @@ namespace KDUpdater {
class UpdateOperation;
-class KDTOOLS_EXPORT UpdateOperationFactory : public KDGenericFactory<UpdateOperation, QString,
+class KDTOOLS_EXPORT UpdateOperationFactory : public GenericFactory<UpdateOperation, QString,
QInstaller::PackageManagerCore*>
{
Q_DISABLE_COPY(UpdateOperationFactory)
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 38ff0e406..f115ddb41 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -76,13 +76,13 @@ InstallerBase::~InstallerBase()
int InstallerBase::run()
{
- KDRunOnceChecker runCheck(qApp->applicationDirPath() + QLatin1String("/lockmyApp1234865.lock"));
- if (runCheck.isRunning(KDRunOnceChecker::ConditionFlag::Lockfile)) {
+ RunOnceChecker runCheck(qApp->applicationDirPath() + QLatin1String("/lockmyApp1234865.lock"));
+ if (runCheck.isRunning(RunOnceChecker::ConditionFlag::Lockfile)) {
// It is possible to install an application and thus the maintenance tool into a
// directory that requires elevated permission to create a lock file. Since this
// cannot be done without requesting credentials from the user, we silently ignore
// the fact that we could not create the lock file and check the running processes.
- if (runCheck.isRunning(KDRunOnceChecker::ConditionFlag::ProcessList)) {
+ if (runCheck.isRunning(RunOnceChecker::ConditionFlag::ProcessList)) {
QInstaller::MessageBoxHandler::information(0, QLatin1String("AlreadyRunning"),
QString::fromLatin1("Waiting for %1").arg(qAppName()),
QString::fromLatin1("Another %1 instance is already running. Wait "
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp
index feea95a37..c0d4891b4 100644
--- a/src/sdk/main.cpp
+++ b/src/sdk/main.cpp
@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
if (QInstaller::isVerbose())
std::cout << VERSION << std::endl << BUILDDATE << std::endl << SHA << std::endl;
- const KDSelfRestarter restarter(argc, argv);
+ const SelfRestarter restarter(argc, argv);
return InstallerBase(argc, argv).run();
} catch (const QInstaller::Error &e) {
diff --git a/src/sdk/settingsdialog.cpp b/src/sdk/settingsdialog.cpp
index c2e0cc27a..4f2f41e69 100644
--- a/src/sdk/settingsdialog.cpp
+++ b/src/sdk/settingsdialog.cpp
@@ -342,7 +342,7 @@ void SettingsDialog::testRepository()
msgBox.setWindowModality(Qt::WindowModal);
msgBox.setDetailedText(testJob.errorString());
- const bool isError = (testJob.error() > KDJob::NoError);
+ const bool isError = (testJob.error() > Job::NoError);
const bool isEnabled = current->data(1, Qt::CheckStateRole).toBool();
msgBox.setText(isError
diff --git a/src/sdk/translations/de.ts b/src/sdk/translations/de.ts
index 33adc97c6..32cc79e40 100644
--- a/src/sdk/translations/de.ts
+++ b/src/sdk/translations/de.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>Abgebrochen</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>Konnte keine Sperrdatei %1 anlegen. Fehlermeldung: %2</translation>
diff --git a/src/sdk/translations/en.ts b/src/sdk/translations/en.ts
index 653a91a81..c559cb93e 100644
--- a/src/sdk/translations/en.ts
+++ b/src/sdk/translations/en.ts
@@ -67,7 +67,7 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation type="unfinished"></translation>
diff --git a/src/sdk/translations/fr.ts b/src/sdk/translations/fr.ts
index 615dcc5cf..c0351120f 100644
--- a/src/sdk/translations/fr.ts
+++ b/src/sdk/translations/fr.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>Annulé</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>Impossible de poser un fichier de verrouillage &apos;%1&apos; : %2</translation>
diff --git a/src/sdk/translations/it.ts b/src/sdk/translations/it.ts
index 17ec711f1..91458b78e 100644
--- a/src/sdk/translations/it.ts
+++ b/src/sdk/translations/it.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>Annullato</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>Impossibile creare il file &apos;%1&apos;: %2</translation>
diff --git a/src/sdk/translations/ja.ts b/src/sdk/translations/ja.ts
index f4d7e102b..facd4c0a7 100644
--- a/src/sdk/translations/ja.ts
+++ b/src/sdk/translations/ja.ts
@@ -25,7 +25,7 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>キャンセルしました</translation>
@@ -2626,7 +2626,7 @@ as root and then clicking OK.</source>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>ロックファイル &apos;%1&apos; を作成できませんでした: %2</translation>
diff --git a/src/sdk/translations/pl.ts b/src/sdk/translations/pl.ts
index 3de7f4678..98af6f62d 100644
--- a/src/sdk/translations/pl.ts
+++ b/src/sdk/translations/pl.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>Anulowano</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>Nie można zablokować pliku &quot;%1&quot;: %2</translation>
diff --git a/src/sdk/translations/ru.ts b/src/sdk/translations/ru.ts
index 57f2c9ba4..81ebdb00e 100644
--- a/src/sdk/translations/ru.ts
+++ b/src/sdk/translations/ru.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>Отменено</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>Не удалось создать файл блокировки «%1»: %2</translation>
diff --git a/src/sdk/translations/zh_cn.ts b/src/sdk/translations/zh_cn.ts
index f3f4d0565..a826448d9 100644
--- a/src/sdk/translations/zh_cn.ts
+++ b/src/sdk/translations/zh_cn.ts
@@ -131,14 +131,14 @@
</message>
</context>
<context>
- <name>KDJob</name>
+ <name>Job</name>
<message>
<source>Canceled</source>
<translation>已取消</translation>
</message>
</context>
<context>
- <name>KDLockFile</name>
+ <name>LockFile</name>
<message>
<source>Cannot create lock file &apos;%1&apos;: %2</source>
<translation>无法创建锁文件“%1”:%2</translation>
diff --git a/src/sdk/updatechecker.cpp b/src/sdk/updatechecker.cpp
index ea0427098..7c10cec19 100644
--- a/src/sdk/updatechecker.cpp
+++ b/src/sdk/updatechecker.cpp
@@ -54,13 +54,13 @@ UpdateChecker::UpdateChecker(int &argc, char *argv[])
int UpdateChecker::check()
{
- KDRunOnceChecker runCheck(qApp->applicationDirPath() + QLatin1String("/lockmyApp15021976.lock"));
- if (runCheck.isRunning(KDRunOnceChecker::ConditionFlag::Lockfile)) {
+ RunOnceChecker runCheck(qApp->applicationDirPath() + QLatin1String("/lockmyApp15021976.lock"));
+ if (runCheck.isRunning(RunOnceChecker::ConditionFlag::Lockfile)) {
// It is possible to install an application and thus the maintenance tool into a
// directory that requires elevated permission to create a lock file. Since this
// cannot be done without requesting credentials from the user, we silently ignore
// the fact that we could not create the lock file and check the running processes.
- if (runCheck.isRunning(KDRunOnceChecker::ConditionFlag::ProcessList))
+ if (runCheck.isRunning(RunOnceChecker::ConditionFlag::ProcessList))
throw QInstaller::Error(QLatin1String("An instance is already checking for updates."));
}