diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ffd7cbe4..3b74e135c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,8 @@ find_package(kdeqt5staging REQUIRED NO_MODULE) find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs KIdleTime ItemModels KWidgetsAddons KWindowSystem KCodecs KArchive KCoreAddons Solid ThreadWeaver KConfig KAuth KJS KWallet KDBusAddons - KI18n KGuiAddons KService KWidgets ItemViews KNotifications KIconThemes KCompletion KJobWidgets KConfigWidgets Sonnet KTextWidgets XmlGui KCrash) + KI18n KGuiAddons KService KWidgets ItemViews KNotifications KIconThemes KCompletion KJobWidgets KConfigWidgets Sonnet KTextWidgets XmlGui KCrash + KIO KUnitConversion KDE4Attic) #find_package(KF5Transitional REQUIRED) # those are not "done" yet: diff --git a/src/declarativeimports/locale/CMakeLists.txt b/src/declarativeimports/locale/CMakeLists.txt index 036baf241..8219f26a1 100644 --- a/src/declarativeimports/locale/CMakeLists.txt +++ b/src/declarativeimports/locale/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(localebindingsplugin ${Qt5Quick_LIBRARIES} ${Qt5Qml_LIBRARIES} ${KDE4_KDECORE_LIBS} + KF5::KDE4Attic ) install(TARGETS localebindingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/locale) install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/locale) diff --git a/src/plasma/CMakeLists.txt b/src/plasma/CMakeLists.txt index 96f6858a5..832b7d08e 100644 --- a/src/plasma/CMakeLists.txt +++ b/src/plasma/CMakeLists.txt @@ -147,8 +147,9 @@ target_link_libraries(plasma ${KAuth_LIBRARIES} ${KWindowSystem_LIBRARIES} ${PLASMA_EXTRA_LIBS} - KI18n + KF5::KI18n ${KDE4Support_LIBRARIES} + KF5::KDE4Attic ) #FIXME gpgme++ is in kdepimlibs, neeeds to be elsewhere target_link_libraries(plasma kdeclarative ${KArchive_LIBRARIES}) diff --git a/src/plasma/data/servicetypes/plasma-generic.desktop b/src/plasma/data/servicetypes/plasma-generic.desktop index 0db3357c7..315148f93 100644 --- a/src/plasma/data/servicetypes/plasma-generic.desktop +++ b/src/plasma/data/servicetypes/plasma-generic.desktop @@ -5,6 +5,7 @@ Name=Plasma Package Name[cs]=Balíček Plasmy Name[de]=Plasma-Paket Name[fi]=Plasma-paketti +Name[fr]=Paquet Plasma Name[nl]=Plasma-pakket Name[pt]=Pacote do Plasma Name[pt_BR]=Pacote do Plasma @@ -14,6 +15,7 @@ Name[uk]=Пакунок Плазми Name[x-test]=xxPlasma Packagexx Comment=Generic Plasma Package Comment[de]=Allgemeines Plasma-Paket +Comment[fr]=Paquet Plasma générique Comment[nl]=Algemeen plasma-pakket Comment[pt]=Pacote Genérico do Plasma Comment[pt_BR]=Pacote genérico do Plasma diff --git a/src/plasma/private/runnerjobs.cpp b/src/plasma/private/runnerjobs.cpp index a012a6cbb..c21f5cdd4 100644 --- a/src/plasma/private/runnerjobs.cpp +++ b/src/plasma/private/runnerjobs.cpp @@ -170,7 +170,7 @@ Plasma::AbstractRunner* FindMatchesJob::runner() const return m_runner; } -DelayedJobCleaner::DelayedJobCleaner(const QSet &jobs, const QSet &runners) +DelayedJobCleaner::DelayedJobCleaner(const QSet > &jobs, const QSet &runners) : QObject(Weaver::instance()), m_weaver(Weaver::instance()), m_jobs(jobs), @@ -178,8 +178,8 @@ DelayedJobCleaner::DelayedJobCleaner(const QSet &jobs, const Q { connect(m_weaver, SIGNAL(finished()), this, SLOT(checkIfFinished())); - foreach (FindMatchesJob *job, m_jobs) { - connect(job, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(jobDone(ThreadWeaver::Job*))); + for (auto it = m_jobs.constBegin(); it != m_jobs.constEnd(); ++it) { + connect((*it).data(), &Job::done, this, &DelayedJobCleaner::jobDone); } } @@ -188,9 +188,9 @@ DelayedJobCleaner::~DelayedJobCleaner() qDeleteAll(m_runners); } -void DelayedJobCleaner::jobDone(ThreadWeaver::Job *job) +void DelayedJobCleaner::jobDone(ThreadWeaver::JobPointer job) { - FindMatchesJob *runJob = dynamic_cast(job); + auto runJob = job.dynamicCast(); if (!runJob) { return; @@ -207,7 +207,6 @@ void DelayedJobCleaner::jobDone(ThreadWeaver::Job *job) void DelayedJobCleaner::checkIfFinished() { if (m_weaver->isIdle()) { - qDeleteAll(m_jobs); m_jobs.clear(); deleteLater(); } diff --git a/src/plasma/private/runnerjobs_p.h b/src/plasma/private/runnerjobs_p.h index cf053248e..7fd707698 100644 --- a/src/plasma/private/runnerjobs_p.h +++ b/src/plasma/private/runnerjobs_p.h @@ -127,16 +127,16 @@ private: class DelayedJobCleaner : public QObject { public: - DelayedJobCleaner(const QSet &jobs, const QSet &runners = QSet()); + DelayedJobCleaner(const QSet > &jobs, const QSet &runners = QSet()); ~DelayedJobCleaner(); private Q_SLOTS: - void jobDone(ThreadWeaver::Job*); + void jobDone(ThreadWeaver::JobPointer); void checkIfFinished(); private: ThreadWeaver::Weaver *m_weaver; - QSet m_jobs; + QSet > m_jobs; QSet m_runners; }; diff --git a/src/plasma/runnermanager.cpp b/src/plasma/runnermanager.cpp index f379fe680..c2919eb40 100644 --- a/src/plasma/runnermanager.cpp +++ b/src/plasma/runnermanager.cpp @@ -231,19 +231,27 @@ public: } if (!deadRunners.isEmpty()) { - QSet deadJobs; - foreach (FindMatchesJob *job, searchJobs) { + QSet > deadJobs; + auto it = searchJobs.begin(); + while (it != searchJobs.end()) { + auto &job = (*it); if (deadRunners.contains(job->runner())) { - QObject::disconnect(job, SIGNAL(done(ThreadWeaver::Job*)), q, SLOT(jobDone(ThreadWeaver::Job*))); - searchJobs.remove(job); + QObject::disconnect(job.data(), SIGNAL(done(ThreadWeaver::JobPointer)), q, SLOT(jobDone(ThreadWeaver::JobPointer))); + it = searchJobs.erase(it); deadJobs.insert(job); + } else { + it++; } } - foreach (FindMatchesJob *job, oldSearchJobs) { + it = oldSearchJobs.begin(); + while (it != oldSearchJobs.end()) { + auto &job = (*it); if (deadRunners.contains(job->runner())) { - oldSearchJobs.remove(job); + it = oldSearchJobs.erase(it); deadJobs.insert(job); + } else { + it++; } } @@ -309,9 +317,9 @@ public: return runner; } - void jobDone(ThreadWeaver::Job *job) + void jobDone(ThreadWeaver::JobPointer job) { - FindMatchesJob *runJob = dynamic_cast(job); + auto runJob = job.dynamicCast(); if (!runJob) { return; @@ -347,9 +355,7 @@ public: } if (Weaver::instance()->isIdle()) { - qDeleteAll(searchJobs); searchJobs.clear(); - qDeleteAll(oldSearchJobs); oldSearchJobs.clear(); } @@ -381,7 +387,6 @@ public: { // WORKAROUND: Queue an empty job to force ThreadWeaver to awaken threads if (searchJobs.isEmpty() && Weaver::instance()->isIdle()) { - qDeleteAll(oldSearchJobs); oldSearchJobs.clear(); checkTearDown(); return; @@ -408,12 +413,12 @@ public: void startJob(AbstractRunner *runner) { if ((runner->ignoredTypes() & context.type()) == 0) { - FindMatchesJob *job = new FindMatchesJob(runner, &context, Weaver::instance()); - QObject::connect(job, SIGNAL(done(ThreadWeaver::Job*)), q, SLOT(jobDone(ThreadWeaver::Job*))); + QSharedPointer job(new FindMatchesJob(runner, &context, Weaver::instance())); + QObject::connect(job.data(), SIGNAL(done(ThreadWeaver::JobPointer)), q, SLOT(jobDone(ThreadWeaver::JobPointer))); if (runner->speed() == AbstractRunner::SlowSpeed) { job->setDelayTimer(&delayTimer); } - Weaver::instance()->enqueueRaw(job); + Weaver::instance()->enqueue(job); searchJobs.insert(job); } } @@ -429,8 +434,8 @@ public: QHash runners; QHash advertiseSingleRunnerIds; AbstractRunner* currentSingleRunner; - QSet searchJobs; - QSet oldSearchJobs; + QSet > searchJobs; + QSet > oldSearchJobs; KConfigGroup conf; QString singleModeRunnerId; bool loadAll : 1; @@ -615,8 +620,8 @@ void RunnerManager::run(const QueryMatch &match) //TODO: this function is not const as it may be used for learning AbstractRunner *runner = match.runner(); - foreach (FindMatchesJob *job, d->searchJobs) { - if (job->runner() == runner && !job->isFinished()) { + for (auto it = d->searchJobs.constBegin(); it != d->searchJobs.constEnd(); ++it) { + if ((*it)->runner() == runner && !(*it)->isFinished()) { #ifndef NDEBUG kDebug() << "deferred run"; #endif @@ -775,13 +780,10 @@ void RunnerManager::reset() { // If ThreadWeaver is idle, it is safe to clear previous jobs if (Weaver::instance()->isIdle()) { - qDeleteAll(d->searchJobs); - qDeleteAll(d->oldSearchJobs); d->oldSearchJobs.clear(); } else { - Q_FOREACH(FindMatchesJob *job, d->searchJobs) { -#warning Reenable the following line one dequeueRaw API has been merged into ThreadWeaver - //Weaver::instance()->dequeueRaw(job); + for (auto it = d->searchJobs.constBegin(); it != d->searchJobs.constEnd(); ++it) { + Weaver::instance()->dequeue((*it)); } d->oldSearchJobs += d->searchJobs; } diff --git a/src/plasma/runnermanager.h b/src/plasma/runnermanager.h index ebeb02925..1963f661f 100644 --- a/src/plasma/runnermanager.h +++ b/src/plasma/runnermanager.h @@ -272,7 +272,7 @@ class PLASMA_EXPORT RunnerManager : public QObject private: Q_PRIVATE_SLOT(d, void scheduleMatchesChanged()) Q_PRIVATE_SLOT(d, void matchesChanged()) - Q_PRIVATE_SLOT(d, void jobDone(ThreadWeaver::Job*)) + Q_PRIVATE_SLOT(d, void jobDone(ThreadWeaver::JobPointer)) Q_PRIVATE_SLOT(d, void unblockJobs()) Q_PRIVATE_SLOT(d, void runnerMatchingSuspended(bool)) diff --git a/src/platformstatus/kded_platformstatus.desktop b/src/platformstatus/kded_platformstatus.desktop index fc90c9d66..351af0640 100644 --- a/src/platformstatus/kded_platformstatus.desktop +++ b/src/platformstatus/kded_platformstatus.desktop @@ -6,6 +6,7 @@ X-KDE-DBus-ModuleName=plaformstatus X-KDE-Kded-autoload=true X-KDE-Kded-load-on-demand=false Name=Platform Status +Name[fr]=État de la plate-forme Name[nl]=Status van platform Name[pt]=Estado da Plataforma Name[pt_BR]=Status da plataforma @@ -14,6 +15,7 @@ Name[sv]=Plattformstatus Name[uk]=Стан платформи Name[x-test]=xxPlatform Statusxx Comment=Tracks the current shell package and the platform definition strings. +Comment[fr]=Suit le paquet du terminal actuel et les chaînes de définition de la plate-forme. Comment[nl]=Volgt het huidige shell-pakket en de definitietekenreeksen van platform. Comment[pt]=Segue o pacote da consola actual e a os textos de definição da plataforma. Comment[pt_BR]=Segue o pacote do shell atual e as strings de definição da plataforma. diff --git a/src/shell/applets/testcomponentsapplet/contents/ui/DialogContent.qml b/src/shell/applets/testcomponentsapplet/contents/ui/DialogContent.qml index e99ca467f..9fed86d33 100644 --- a/src/shell/applets/testcomponentsapplet/contents/ui/DialogContent.qml +++ b/src/shell/applets/testcomponentsapplet/contents/ui/DialogContent.qml @@ -48,11 +48,11 @@ Item { id: localeItem anchors { left: parent.left; right: parent.right; top: tx.bottom; } } -// PlasmaComponents.TextArea { -// anchors { left: parent.left; right: parent.right; top: localeItem.bottom; } -// width: parent.width -// height: 80 -// } + PlasmaComponents.TextArea { + anchors { left: parent.left; right: parent.right; top: localeItem.bottom; } + width: parent.width + height: 80 + } PlasmaComponents.Button { id: thanks anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 24; } diff --git a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml index a698901fb..27c006d4d 100644 --- a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml +++ b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml @@ -180,7 +180,7 @@ PlasmaComponents.Page { width: _h text: "Top" onClicked: { - locationDialog.location = PlasmaCore.Plasma.TopEdge; + locationDialog.location = PlasmaCore.Types.TopEdge; locationDialog.visible = !locationDialog.visible } } @@ -188,7 +188,7 @@ PlasmaComponents.Page { text: "Bottom" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.BottomEdge; + locationDialog.location = PlasmaCore.Types.BottomEdge; locationDialog.visible = !locationDialog.visible } } @@ -196,7 +196,7 @@ PlasmaComponents.Page { text: "Left" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.LeftEdge; + locationDialog.location = PlasmaCore.Types.LeftEdge; locationDialog.visible = !locationDialog.visible } } @@ -204,7 +204,7 @@ PlasmaComponents.Page { text: "Right" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.RightEdge; + locationDialog.location = PlasmaCore.Types.RightEdge; locationDialog.visible = !locationDialog.visible } } @@ -212,7 +212,7 @@ PlasmaComponents.Page { text: "Desktop" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.Desktop; + locationDialog.location = PlasmaCore.Types.Desktop; locationDialog.visible = !locationDialog.visible } } @@ -220,7 +220,7 @@ PlasmaComponents.Page { text: "Floating" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.Floating; + locationDialog.location = PlasmaCore.Types.Floating; locationDialog.visible = !locationDialog.visible } } @@ -228,7 +228,7 @@ PlasmaComponents.Page { text: "FullScreen" width: _h onClicked: { - locationDialog.location = PlasmaCore.Plasma.FullScreen; + locationDialog.location = PlasmaCore.Types.FullScreen; locationDialog.visible = !locationDialog.visible } }