~ubuntu-branches/ubuntu/lucid/kdebase/lucid-proposed

« back to all changes in this revision

Viewing changes to apps/plasma/applets/folderview/folderview.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2010-02-05 00:02:39 UTC
  • mfrom: (1.1.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20100205000239-lt383r0hn42wmuvs
Tags: 4:4.4.0-0ubuntu1
* New upstream release
 - Bump on Build-Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
1153
1153
    if (!c) {
1154
1154
        return;
1155
1155
    }
 
1156
 
1156
1157
    const QRect screenRect = c->screenGeometry(screen());
1157
 
    const QRect availRect = QApplication::desktop()->availableGeometry(screen());
 
1158
    QRect availRect;
 
1159
    //FIXME: a pretty horrible hack, but there we go; should do something more elegant in 4.5
 
1160
    if (c->metaObject()->indexOfSlot("availableScreenRect(int)") != -1) {
 
1161
        QMetaObject::invokeMethod(c, "availableScreenRect",
 
1162
                                  Qt::DirectConnection, Q_RETURN_ARG(QRect, availRect), Q_ARG(int, screen()));
 
1163
    } else {
 
1164
        kDebug() << "using qdesktopwidget";
 
1165
        availRect = QApplication::desktop()->availableGeometry(screen());
 
1166
    }
 
1167
 
1158
1168
    m_iconView->setContentsMargins(availRect.x() - screenRect.x(),
1159
1169
                                   availRect.y() - screenRect.y(),
1160
1170
                                   screenRect.right() - availRect.right(),