merge
This commit is contained in:
commit
d3b9cf5f35
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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})
|
||||
|
@ -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
|
||||
|
@ -170,7 +170,7 @@ Plasma::AbstractRunner* FindMatchesJob::runner() const
|
||||
return m_runner;
|
||||
}
|
||||
|
||||
DelayedJobCleaner::DelayedJobCleaner(const QSet<FindMatchesJob *> &jobs, const QSet<AbstractRunner *> &runners)
|
||||
DelayedJobCleaner::DelayedJobCleaner(const QSet<QSharedPointer<FindMatchesJob> > &jobs, const QSet<AbstractRunner *> &runners)
|
||||
: QObject(Weaver::instance()),
|
||||
m_weaver(Weaver::instance()),
|
||||
m_jobs(jobs),
|
||||
@ -178,8 +178,8 @@ DelayedJobCleaner::DelayedJobCleaner(const QSet<FindMatchesJob *> &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<FindMatchesJob *>(job);
|
||||
auto runJob = job.dynamicCast<FindMatchesJob>();
|
||||
|
||||
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();
|
||||
}
|
||||
|
@ -127,16 +127,16 @@ private:
|
||||
class DelayedJobCleaner : public QObject
|
||||
{
|
||||
public:
|
||||
DelayedJobCleaner(const QSet<FindMatchesJob*> &jobs, const QSet<AbstractRunner *> &runners = QSet<AbstractRunner *>());
|
||||
DelayedJobCleaner(const QSet<QSharedPointer<FindMatchesJob> > &jobs, const QSet<AbstractRunner *> &runners = QSet<AbstractRunner *>());
|
||||
~DelayedJobCleaner();
|
||||
|
||||
private Q_SLOTS:
|
||||
void jobDone(ThreadWeaver::Job*);
|
||||
void jobDone(ThreadWeaver::JobPointer);
|
||||
void checkIfFinished();
|
||||
|
||||
private:
|
||||
ThreadWeaver::Weaver *m_weaver;
|
||||
QSet<FindMatchesJob*> m_jobs;
|
||||
QSet<QSharedPointer<FindMatchesJob> > m_jobs;
|
||||
QSet<AbstractRunner *> m_runners;
|
||||
};
|
||||
|
||||
|
@ -231,19 +231,27 @@ public:
|
||||
}
|
||||
|
||||
if (!deadRunners.isEmpty()) {
|
||||
QSet<FindMatchesJob *> deadJobs;
|
||||
foreach (FindMatchesJob *job, searchJobs) {
|
||||
QSet<QSharedPointer<FindMatchesJob> > 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<FindMatchesJob *>(job);
|
||||
auto runJob = job.dynamicCast<FindMatchesJob>();
|
||||
|
||||
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<FindMatchesJob> 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<QString, AbstractRunner*> runners;
|
||||
QHash<QString, QString> advertiseSingleRunnerIds;
|
||||
AbstractRunner* currentSingleRunner;
|
||||
QSet<FindMatchesJob*> searchJobs;
|
||||
QSet<FindMatchesJob*> oldSearchJobs;
|
||||
QSet<QSharedPointer<FindMatchesJob> > searchJobs;
|
||||
QSet<QSharedPointer<FindMatchesJob> > 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;
|
||||
}
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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; }
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user