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));
}
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);
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()));
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