get rid of appletcreationtimer

This commit is contained in:
Marco Martin 2013-08-12 14:38:10 +02:00
parent ebe6bbe1ab
commit 78978cd7e3
2 changed files with 1 additions and 13 deletions

View File

@ -81,10 +81,6 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
m_qmlObject = new QmlObject(this);
m_qmlObject->setInitializationDelayed(true);
m_creationTimer = new QTimer(this);
m_creationTimer->setSingleShot(true);
connect(m_creationTimer, &QTimer::timeout, this, &AppletInterface::init);
m_collapseTimer = new QTimer(this);
m_collapseTimer->setSingleShot(true);
connect(m_collapseTimer, &QTimer::timeout, this, &AppletInterface::compactRepresentationCheck);
@ -733,15 +729,8 @@ void AppletInterface::itemChange(ItemChange change, const ItemChangeData &value)
{
if (change == QQuickItem::ItemSceneChange) {
//we have a window: create the
if (value.window && !m_qmlObject->rootObject() /*&& !m_creationTimer->isActive()*/) {
if (value.window && !m_qmlObject->rootObject()) {
init();
/*Experiment on even more delayed, doesn't seem to be good
QTime time = QTime::currentTime();
qsrand((uint)time.msec());
const int interval = qrand() % ((1000 + 1) - 50) + 50;
//QTimer::singleShot(interval, m_appletScriptEngine, SLOT(delayedInit()));
m_creationTimer->start(interval);*/
}
}
QQuickItem::itemChange(change, value);

View File

@ -207,7 +207,6 @@ private:
QmlObject *m_qmlObject;
QWeakPointer<QObject> m_compactUiObject;
QTimer *m_creationTimer;
QTimer *m_collapseTimer;
Plasma::Types::BackgroundHints m_backgroundHints;