set a timer for sync docks screens

--add debuging message
pull/1/head
Michail Vourlakos 8 years ago
parent 2e54a90eef
commit 81dfa36cef

@ -71,10 +71,15 @@ DockCorona::DockCorona(QObject *parent)
}
connect(m_activityConsumer, &KActivities::Consumer::serviceStatusChanged, this, &DockCorona::load);
m_docksScreenSyncTimer.setSingleShot(true);
m_docksScreenSyncTimer.setInterval(2500);
connect(&m_docksScreenSyncTimer, &QTimer::timeout, this, &DockCorona::syncDockViews);
}
DockCorona::~DockCorona()
{
m_docksScreenSyncTimer.stop();
cleanConfig();
while (!containments().isEmpty()) {
@ -293,7 +298,7 @@ void DockCorona::screenRemoved(QScreen *screen)
void DockCorona::screenCountChanged()
{
QTimer::singleShot(2500, this, &DockCorona::syncDockViews);
m_docksScreenSyncTimer.start();
}
void DockCorona::syncDockViews()
@ -566,8 +571,10 @@ void DockCorona::addDock(Plasma::Containment *containment)
}
}
if (!found)
if (!found) {
qDebug() << "adding dock rejected, screen not available : " << connector;
return;
}
}
qDebug() << "Adding dock for container...";

@ -107,6 +107,8 @@ private:
QHash<const Plasma::Containment *, DockView *> m_waitingDockViews;
QList<KDeclarative::QmlObject *> m_alternativesObjects;
QTimer m_docksScreenSyncTimer;
KActivities::Consumer *m_activityConsumer;
QPointer<KAboutApplicationDialog> aboutDialog;

@ -104,7 +104,7 @@ DockView::DockView(Plasma::Corona *corona, QScreen *targetScreen)
}
m_screenSyncTimer.setSingleShot(true);
m_screenSyncTimer.setInterval(3000);
m_screenSyncTimer.setInterval(2000);
connect(&m_screenSyncTimer, &QTimer::timeout, this, &DockView::reconsiderScreen);
}

Loading…
Cancel
Save