Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/plasma-framework/src/plasmaquick/appletquickitem.cpp b/plasma-framework/src/plasmaquick/appletquickitem.cpp
- index be5ea6a1b..ff4fe9868 100644
- --- a/plasma-framework/src/plasmaquick/appletquickitem.cpp
- +++ b/plasma-framework/src/plasmaquick/appletquickitem.cpp
- @@ -16,6 +16,7 @@
- #include <QRandomGenerator>
- #include <QDebug>
- +#include <QThread>
- #include <KLocalizedString>
- @@ -61,6 +62,7 @@ AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickIte
- qCInfo(LOG_PLASMAQUICK) << "Applet preload policy set to" << s_preloadPolicy;
- }
- + qCDebug(LOG_PLASMAQUICK) << "constructor AppletQuickItemPrivate" << this;
- }
- void AppletQuickItemPrivate::init()
- @@ -294,6 +296,8 @@ bool AppletQuickItemPrivate::appletShouldBeExpanded() const
- } else {
- if (switchWidth > 0 && switchHeight > 0) {
- + qCDebug(LOG_PLASMAQUICK) << "Width:" << q->width() << switchWidth;
- + qCDebug(LOG_PLASMAQUICK) << "Height:" << q->height() << switchHeight;
- return q->width() > switchWidth && q->height() > switchHeight;
- // if a size to switch wasn't set, determine what representation to always chose
- @@ -345,15 +349,18 @@ void AppletQuickItemPrivate::anchorsFillParent(QQuickItem *item, QQuickItem *par
- void AppletQuickItemPrivate::compactRepresentationCheck()
- {
- if (!initComplete) {
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "return 1";
- return;
- }
- if (!qmlObject->rootObject()) {
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "return 2";
- return;
- }
- // ignore 0 sizes;
- if (q->width() <= 0 || q->height() <= 0) {
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "return 3";
- return;
- }
- @@ -361,6 +368,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
- if ((full && fullRepresentationItem && fullRepresentationItem == currentRepresentationItem)
- || (!full && compactRepresentationItem && compactRepresentationItem == currentRepresentationItem)) {
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "return 4";
- return;
- }
- @@ -387,6 +395,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
- connectLayoutAttached(item);
- expanded = true;
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "setExpanded (check)" << this << true;
- Q_EMIT q->expandedChanged(true);
- }
- @@ -414,6 +423,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
- connectLayoutAttached(compactItem);
- expanded = false;
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "setExpanded (check)" << this << false;
- Q_EMIT q->expandedChanged(false);
- }
- }
- @@ -680,6 +690,7 @@ void AppletQuickItem::init()
- }
- d->initComplete = true;
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "trap 1";
- d->compactRepresentationCheck();
- qmlObject()->engine()->rootContext()->setBaseUrl(qmlObject()->source());
- qmlObject()->engine()->setContextForObject(this, qmlObject()->engine()->rootContext());
- @@ -749,6 +760,7 @@ void AppletQuickItem::setSwitchWidth(int width)
- }
- d->switchWidth = width;
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "trap 2" << width;
- d->compactRepresentationCheck();
- Q_EMIT switchWidthChanged(width);
- }
- @@ -765,6 +777,7 @@ void AppletQuickItem::setSwitchHeight(int height)
- }
- d->switchHeight = height;
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "trap 3" << height;
- d->compactRepresentationCheck();
- Q_EMIT switchHeightChanged(height);
- }
- @@ -829,6 +842,7 @@ void AppletQuickItem::setPreferredRepresentation(QQmlComponent *component)
- d->preferredRepresentation = component;
- Q_EMIT preferredRepresentationChanged(component);
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "trap 4";
- d->compactRepresentationCheck();
- }
- @@ -839,6 +853,7 @@ bool AppletQuickItem::isExpanded() const
- void AppletQuickItem::setExpanded(bool expanded)
- {
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "setExpanded" << this << expanded;
- if (d->expanded == expanded) {
- return;
- }
- @@ -913,6 +928,7 @@ void AppletQuickItem::geometryChanged(const QRectF &newGeometry, const QRectF &o
- Q_UNUSED(oldGeometry)
- QQuickItem::geometryChanged(newGeometry, oldGeometry);
- + qCDebug(LOG_PLASMAQUICK) << QThread::currentThreadId() << "trap 5" << newGeometry << oldGeometry;
- d->compactRepresentationCheck();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement