]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarspaceinfo.cpp
${CMAKE_SOURCE_DIR}/libkonq doesn't exist now
[dolphin.git] / src / statusbarspaceinfo.cpp
index 69296e7b3285c77e4b22496b61af2c7173337d62..84436813608728d4af814adc631e949c338aab02 100644 (file)
@@ -75,7 +75,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
     frameColor.setAlpha(128);
     painter.setPen(frameColor);
 
-    const QColor backgrColor = KColorScheme(KColorScheme::View).background();
+    const QColor backgrColor = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
     painter.setBrush(backgrColor);
 
     painter.drawRect(QRect(0, barTop + 1 , barWidth - widthDec, barHeight));
@@ -93,28 +93,28 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
         }
         painter.drawRect(QRect(left, barTop + 2, right, barHeight - 1));
 
-        text = i18n("%1 free", KIO::convertSizeFromKiB(m_kBAvailable));
+        text = i18nc("@info:status", "%1 free", KIO::convertSizeFromKiB(m_kBAvailable));
     } else {
         if (m_gettingSize) {
-            text = i18n("Getting size...");
+            text = i18nc("@info:status", "Getting size...");
         } else {
             text = QString();
-            QTimer::singleShot(0, this, SLOT(hide()));
+            QMetaObject::invokeMethod(this, "hide", Qt::QueuedConnection);
         }
     }
 
     // draw text
-    painter.setPen(KColorScheme(KColorScheme::View).foreground());
+    painter.setPen(KColorScheme(QPalette::Active, KColorScheme::View).foreground().color());
     painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 6),
                      Qt::AlignCenter | Qt::TextWordWrap,
                      text);
 }
 
 
-void StatusBarSpaceInfo::slotFoundMountPoint(const quint64& kBSize,
-                                             const quint64& kBUsed,
-                                             const quint64& kBAvailable,
-                                             const QString& mountPoint)
+void StatusBarSpaceInfo::slotFoundMountPoint(const QString& mountPoint,
+                                             quint64 kBSize,
+                                             quint64 kBUsed,
+                                             quint64 kBAvailable)
 {
     Q_UNUSED(kBUsed);
     Q_UNUSED(mountPoint);
@@ -148,14 +148,14 @@ void StatusBarSpaceInfo::refresh()
         return;
 
     KDiskFreeSpace* job = new KDiskFreeSpace(this);
-    connect(job, SIGNAL(foundMountPoint(const quint64&,
-                                        const quint64&,
-                                        const quint64&,
-                                        const QString&)),
-            this, SLOT(slotFoundMountPoint(const quint64&,
-                                           const quint64&,
-                                           const quint64&,
-                                           const QString&)));
+    connect(job, SIGNAL(foundMountPoint(const QString&,
+                                        quint64,
+                                        quint64,
+                                        quint64)),
+            this, SLOT(slotFoundMountPoint(const QString&,
+                                           quint64,
+                                           quint64,
+                                           quint64)));
     connect(job, SIGNAL(done()),
             this, SLOT(showResult()));
 
@@ -164,7 +164,7 @@ void StatusBarSpaceInfo::refresh()
 
 QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const
 {
-    QColor color = KColorScheme(KColorScheme::Button).background();
+    QColor color = KColorScheme(QPalette::Active, KColorScheme::Button).background().color();
 
     // assure that enough contrast is given between the background color
     // and the progressbar color