Partially port away from KLocale.

KLocale was replaced with KLocalizedString and QLocale.
Only changes that do not break compilation with KDELibs4 are made.
This commit is contained in:
Andrius Štikonas 2014-05-13 23:53:37 +01:00
parent b2d299e18d
commit ed431cfcd5
85 changed files with 155 additions and 151 deletions

View File

@ -25,7 +25,6 @@
#include "util/globallog.h"
#include <QDebug>
#include <klocale.h>
#include <config.h>

View File

@ -26,7 +26,7 @@
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kaboutdata.h>
#include <kservice.h>
#include <kservicetypetrader.h>

View File

@ -37,6 +37,7 @@
#include <kservice.h>
#include <kmessagebox.h>
#include <kcmdlineargs.h>
#include <KLocalizedString>
#include <config.h>

View File

@ -24,7 +24,7 @@
#include "util/capacity.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QFile>
#include <QByteArray>

View File

@ -25,8 +25,6 @@
#include "core/operationstack.h"
#include "core/device.h"
#include <klocale.h>
/** Constructs a DeviceScanner
@param ostack the OperationStack where the devices will be created
*/

View File

@ -27,8 +27,6 @@
#include <QMutex>
#include <klocale.h>
/** Constructs an OperationRunner.
@param ostack the OperationStack to act on
*/

View File

@ -40,7 +40,7 @@
#include "util/globallog.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QReadLocker>
#include <QWriteLocker>
@ -104,7 +104,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
SetFileSystemLabelOperation* pushedLabelOp = dynamic_cast<SetFileSystemLabelOperation*>(pushedOp);
CreateFileSystemOperation* pushedCreateFileSystemOp = dynamic_cast<CreateFileSystemOperation*>(pushedOp);
CheckOperation* pushedCheckOp = dynamic_cast<CheckOperation*>(pushedOp);
// -- 1 --
if (pushedDeleteOp && &newOp->newPartition() == &pushedDeleteOp->deletedPartition() && !pushedDeleteOp->deletedPartition().roles().has(PartitionRole::Extended))
{
@ -199,13 +199,13 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
if (pushedCheckOp && &newOp->newPartition() == &pushedCheckOp->checkedPartition())
{
Log() << i18nc("@info/plain", "Checking file systems is automatically done when creating them: No new operation required.");
delete pushedOp;
pushedOp = NULL;
return true;
}
return false;
}

View File

@ -31,7 +31,7 @@
#include <QStringList>
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
#include <kmountpoint.h>
/** Creates a new Partition object.

View File

@ -27,7 +27,7 @@
#include "util/globallog.h"
#include <klocale.h>
#include <KLocalizedString>
#include <config.h>

View File

@ -148,7 +148,7 @@ Partition* PartitionNode::findPartitionBySector(qint64 s, const PartitionRole& r
foreach (Partition* child, p->children())
if ((child->roles().roles() & role.roles()) && s >= child->firstSector() && s <= child->lastSector())
return child;
if ((p->roles().roles() & role.roles()) && s >= p->firstSector() && s <= p->lastSector())
return p;
}
@ -198,7 +198,7 @@ qint32 PartitionNode::highestMountedChild() const
foreach (const Partition* p, children())
if (p->number() > result && p->isMounted())
result = p->number();
return result;
}

View File

@ -20,7 +20,7 @@
#include "core/partitionrole.h"
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** @return the role as string */
QString PartitionRole::toString() const

View File

@ -30,7 +30,7 @@
#include "util/globallog.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kglobal.h>
#include <QDebug>

View File

@ -20,6 +20,8 @@
#include "core/smartattribute.h"
#include "core/smartstatus.h"
#include <QLocale>
#include <kglobal.h>
#include <klocale.h>
@ -87,7 +89,7 @@ static QString getPrettyValue(qint64 value, qint64 unit)
break;
case SK_SMART_ATTRIBUTE_UNIT_NONE:
rval = KGlobal::locale()->formatNumber(value, 0);
rval = QLocale().toString(value);
break;
case SK_SMART_ATTRIBUTE_UNIT_UNKNOWN:

View File

@ -20,7 +20,7 @@
#include "core/smartstatus.h"
#include "core/smartattribute.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kglobal.h>
#include <QDebug>
@ -206,7 +206,7 @@ QString SmartStatus::tempToString(qint64 mkelvin)
{
const double celsius = (mkelvin - 273150.0) / 1000.0;
const double fahrenheit = 9.0 * celsius / 5.0 + 32;
return i18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", KGlobal::locale()->formatNumber(celsius, 1), KGlobal::locale()->formatNumber(fahrenheit, 1));
return i18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", QLocale().toString(celsius, 1), QLocale().toString(fahrenheit, 1));
}
QString SmartStatus::selfTestStatusToString(SmartStatus::SelfTestStatus s)

View File

@ -26,7 +26,7 @@
#include <QString>
#include <QRegExp>
#include <klocale.h>
#include <KLocalizedString>
#include <ktempdir.h>
namespace FS

View File

@ -25,7 +25,7 @@
#include "fatlabel/fatlabel.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QString>
#include <QStringList>

View File

@ -23,7 +23,7 @@
#include "util/capacity.h"
#include <blkid/blkid.h>
#include <klocale.h>
#include <KLocalizedString>
#include <config.h>
@ -268,32 +268,32 @@ static const QString* typeNames()
{
static const QString s[] =
{
i18nc("@item/plain filesystem name", "unknown"),
i18nc("@item/plain filesystem name", "extended"),
i18nc("@item filesystem name", "unknown"),
i18nc("@item filesystem name", "extended"),
i18nc("@item/plain filesystem name", "ext2"),
i18nc("@item/plain filesystem name", "ext3"),
i18nc("@item/plain filesystem name", "ext4"),
i18nc("@item/plain filesystem name", "linuxswap"),
i18nc("@item/plain filesystem name", "fat16"),
i18nc("@item/plain filesystem name", "fat32"),
i18nc("@item/plain filesystem name", "ntfs"),
i18nc("@item/plain filesystem name", "reiser"),
i18nc("@item/plain filesystem name", "reiser4"),
i18nc("@item/plain filesystem name", "xfs"),
i18nc("@item/plain filesystem name", "jfs"),
i18nc("@item/plain filesystem name", "hfs"),
i18nc("@item/plain filesystem name", "hfsplus"),
i18nc("@item/plain filesystem name", "ufs"),
i18nc("@item/plain filesystem name", "unformatted"),
i18nc("@item/plain filesystem name", "btrfs"),
i18nc("@item/plain filesystem name", "hpfs"),
i18nc("@item/plain filesystem name", "luks"),
i18nc("@item/plain filesystem name", "ocfs2"),
i18nc("@item/plain filesystem name", "zfs"),
i18nc("@item/plain filesystem name", "exfat"),
i18nc("@item/plain filesystem name", "nilfs2"),
i18nc("@item/plain filesystem name", "lvm2 pv"),
i18nc("@item filesystem name", "ext2"),
i18nc("@item filesystem name", "ext3"),
i18nc("@item filesystem name", "ext4"),
i18nc("@item filesystem name", "linuxswap"),
i18nc("@item filesystem name", "fat16"),
i18nc("@item filesystem name", "fat32"),
i18nc("@item filesystem name", "ntfs"),
i18nc("@item filesystem name", "reiser"),
i18nc("@item filesystem name", "reiser4"),
i18nc("@item filesystem name", "xfs"),
i18nc("@item filesystem name", "jfs"),
i18nc("@item filesystem name", "hfs"),
i18nc("@item filesystem name", "hfsplus"),
i18nc("@item filesystem name", "ufs"),
i18nc("@item filesystem name", "unformatted"),
i18nc("@item filesystem name", "btrfs"),
i18nc("@item filesystem name", "hpfs"),
i18nc("@item filesystem name", "luks"),
i18nc("@item filesystem name", "ocfs2"),
i18nc("@item filesystem name", "zfs"),
i18nc("@item filesystem name", "exfat"),
i18nc("@item filesystem name", "nilfs2"),
i18nc("@item filesystem name", "lvm2 pv"),
};
return s;

View File

@ -26,7 +26,7 @@
#include <QStringList>
#include <QRegExp>
#include <klocale.h>
#include <KLocalizedString>
#include <ktempdir.h>
#include <unistd.h>

View File

@ -21,7 +21,7 @@
#include "util/externalcommand.h"
#include <klocale.h>
#include <KLocalizedString>
namespace FS
{

View File

@ -28,7 +28,7 @@
#include <QString>
#include <QUuid>
#include <KLocale>
#include <KLocalizedString>
namespace FS
{

View File

@ -27,7 +27,7 @@
#include <QString>
#include <QUuid>
#include <KLocale>
#include <KLocalizedString>
#include <KTempDir>
namespace FS

View File

@ -24,7 +24,7 @@
#include "util/report.h"
#include "util/globallog.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QString>
#include <QStringList>

View File

@ -28,7 +28,7 @@
#include <QRegExp>
#include <ktempdir.h>
#include <klocale.h>
#include <KLocalizedString>
#include <unistd.h>

View File

@ -39,6 +39,7 @@
#include <QTextStream>
#include <kapplication.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <krun.h>

View File

@ -23,7 +23,7 @@
#include "core/device.h"
#include "core/partitiontable.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <config.h>

View File

@ -23,7 +23,7 @@
#include "core/device.h"
#include "core/partitiontable.h"
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <config.h>

View File

@ -29,9 +29,9 @@
#include "util/capacity.h"
#include "util/helpers.h"
#include <KLocalizedString>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kglobal.h>
#include <kglobalsettings.h>

View File

@ -23,6 +23,7 @@
#include "core/partition.h"
#include <kmessagebox.h>
#include <KLocalizedString>
#include <kguiitem.h>
#include <kstandardguiitem.h>

View File

@ -25,7 +25,7 @@
#include "fs/filesystem.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kfiledialog.h>
#include <klineedit.h>
#include <kmountpoint.h>

View File

@ -23,7 +23,7 @@
#include "fs/filesystem.h"
#include "fs/filesystemfactory.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kpushbutton.h>
#include <kiconloader.h>

View File

@ -19,8 +19,7 @@
#include "gui/formattedspinbox.h"
#include <kglobal.h>
#include <klocale.h>
#include <QLocale>
// private method from Qt sources, qabstractspinbox.h:
@ -53,10 +52,10 @@ QString FormattedSpinBox::stripped(const QString &t, int *pos) const
QString FormattedSpinBox::textFromValue(double value) const
{
return KGlobal::locale()->formatNumber(value, decimals());
return QLocale().toString(value, 'f', decimals());
}
double FormattedSpinBox::valueFromText(const QString& text) const
{
return KGlobal::locale()->readNumber(stripped(text));
return QLocale().toDouble(stripped(text));
}

View File

@ -31,10 +31,10 @@
#include <QLabel>
#include <QFrame>
#include <QDockWidget>
#include <QLocale>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new InfoPane instance
@param parent the parent widget
@ -123,9 +123,9 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
createLabels(i18nc("@label partition", "Hash:"), FS::luks::getHashName(deviceNode), cols(area), x, y);
createLabels(i18nc("@label partition", "Key size:"), FS::luks::getKeySize(deviceNode), cols(area), x, y);
createLabels(i18nc("@label partition", "Payload offset:"), FS::luks::getPayloadOffset(deviceNode), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), KGlobal::locale()->formatNumber(p.firstSector(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), KGlobal::locale()->formatNumber(p.lastSector(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), KGlobal::locale()->formatNumber(p.length(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
}
else
{
@ -133,9 +133,9 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
createLabels(i18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
createLabels(i18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), KGlobal::locale()->formatNumber(p.firstSector(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), KGlobal::locale()->formatNumber(p.lastSector(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), KGlobal::locale()->formatNumber(p.length(), 0), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
}
}
@ -165,10 +165,10 @@ void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d)
createLabels(i18nc("@label device", "Type:"), type, cols(area), x, y);
createLabels(i18nc("@label device", "Capacity:"), Capacity::formatByteSize(d.capacity()), cols(area), x, y);
createLabels(i18nc("@label device", "Total sectors:"), KGlobal::locale()->formatNumber(d.totalSectors(), 0), cols(area), x, y);
createLabels(i18nc("@label device", "Total sectors:"), QLocale().toString(d.totalSectors()), cols(area), x, y);
createLabels(i18nc("@label device", "Heads:"), QString::number(d.heads()), cols(area), x, y);
createLabels(i18nc("@label device", "Cylinders:"), KGlobal::locale()->formatNumber(d.cylinders(), 0), cols(area), x, y);
createLabels(i18nc("@label device", "Sectors:"), KGlobal::locale()->formatNumber(d.sectorsPerTrack(), 0), cols(area), x, y);
createLabels(i18nc("@label device", "Cylinders:"), QLocale().toString(d.cylinders()), cols(area), x, y);
createLabels(i18nc("@label device", "Sectors:"), QLocale().toString(d.sectorsPerTrack()), cols(area), x, y);
createLabels(i18nc("@label device", "Logical sector size:"), Capacity::formatByteSize(d.logicalSectorSize()), cols(area), x, y);
createLabels(i18nc("@label device", "Physical sector size:"), Capacity::formatByteSize(d.physicalSectorSize()), cols(area), x, y);
createLabels(i18nc("@label device", "Cylinder size:"), i18ncp("@label", "1 Sector", "%1 Sectors", d.cylinderSize()), cols(area), x, y);

View File

@ -27,7 +27,7 @@
#include "ops/resizeoperation.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new InsertDialog instance.
@param parent the parent widget

View File

@ -62,6 +62,7 @@
#include <kaction.h>
#include <kapplication.h>
#include <kmenu.h>
#include <KLocalizedString>
#include <kxmlguifactory.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>

View File

@ -32,6 +32,8 @@
#include <QtAlgorithms>
#include <KLocalizedString>
/** Creates a NewDialog
@param parent the parent widget
@param device the Device on which a new Partition is to be created

View File

@ -49,13 +49,14 @@
#include "util/report.h"
#include "util/helpers.h"
#include <klocale.h>
#include <KLocalizedString>
#include <kmenu.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <kglobal.h>
#include <QCursor>
#include <QLocale>
#include <QPointer>
#include <QReadLocker>
@ -224,9 +225,9 @@ static QTreeWidgetItem* createTreeWidgetItem(const Partition& p)
item->setText(i++, Capacity::formatByteSize(p.used()));
item->setText(i++, Capacity::formatByteSize(p.available()));
item->setText(i++, KGlobal::locale()->formatNumber(p.firstSector(), 0));
item->setText(i++, KGlobal::locale()->formatNumber(p.lastSector(), 0));
item->setText(i++, KGlobal::locale()->formatNumber(p.length(), 0));
item->setText(i++, QLocale().toString(p.firstSector()));
item->setText(i++, QLocale().toString(p.lastSector()));
item->setText(i++, QLocale().toString(p.length()));
item->setText(i++, PartitionTable::flagNames(p.activeFlags()).join(", "));

View File

@ -28,13 +28,14 @@
#include "util/capacity.h"
#include "util/helpers.h"
#include <QtAlgorithms>
#include <kmessagebox.h>
#include <kglobalsettings.h>
#include <KLocalizedString>
#include <kpushbutton.h>
#include <klineedit.h>
#include <QtAlgorithms>
/** Creates a new PartPropsDialog
@param parent pointer to the parent widget
@param d the Device the Partition is on

View File

@ -24,7 +24,7 @@
#include <QMouseEvent>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new PartTableWidget.
@param parent pointer to the parent widget

View File

@ -29,6 +29,8 @@
#include "util/capacity.h"
#include <KLocalizedString>
/** Creates a new ResizeDialog
@param parent pointer to the parent widget
@param device the Device the Partition to resize is on

View File

@ -19,7 +19,7 @@
#include "gui/scanprogressdialog.h"
#include <klocale.h>
#include <KLocalizedString>
ScanProgressDialog::ScanProgressDialog(QWidget* parent) :
KProgressDialog(parent)

View File

@ -29,6 +29,8 @@
#include "util/capacity.h"
#include <KLocalizedString>
#include <config.h>
static double sectorsToDialogUnit(const Device& d, qint64 v);

View File

@ -29,7 +29,7 @@
#include <kpushbutton.h>
#include <kiconloader.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kfiledialog.h>
#include <kio/copyjob.h>
#include <kio/netaccess.h>
@ -99,11 +99,11 @@ void SmartDialog::setupDialog()
dialogWidget().temperature().setText(SmartStatus::tempToString(device().smartStatus().temp()));
const QString badSectors = device().smartStatus().badSectors() > 0
? KGlobal::locale()->formatNumber(device().smartStatus().badSectors(), 0)
? QLocale().toString(device().smartStatus().badSectors())
: i18nc("@label SMART number of bad sectors", "none");
dialogWidget().badSectors().setText(badSectors);
dialogWidget().poweredOn().setText(KGlobal::locale()->formatDuration(device().smartStatus().poweredOn()));
dialogWidget().powerCycles().setText(KGlobal::locale()->formatNumber(device().smartStatus().powerCycles(), 0));
dialogWidget().powerCycles().setText(QLocale().toString(device().smartStatus().powerCycles()));
dialogWidget().overallAssessment().setText(SmartStatus::overallAssessmentToString(device().smartStatus().overall()));
dialogWidget().selfTests().setText(SmartStatus::selfTestStatusToString(device().smartStatus().selfTestStatus()));
@ -118,13 +118,13 @@ void SmartDialog::setupDialog()
{
QTreeWidgetItem* item = new QTreeWidgetItem(
QStringList()
<< KGlobal::locale()->formatNumber(a.id(), 0)
<< QLocale().toString(a.id())
<< QString("<b>%1</b><br/>%2").arg(a.name()).arg(st + a.desc() + "</span>")
<< (a.failureType() == SmartAttribute::PreFailure ? i18nc("@item:intable", "Pre-Failure") : i18nc("@item:intable", "Old-Age"))
<< (a.updateType() == SmartAttribute::Online ? i18nc("@item:intable", "Online") : i18nc("@item:intable", "Offline"))
<< KGlobal::locale()->formatNumber(a.worst(), 0)
<< KGlobal::locale()->formatNumber(a.current(), 0)
<< KGlobal::locale()->formatNumber(a.threshold(), 0)
<< QLocale().toString(a.worst())
<< QLocale().toString(a.current())
<< QLocale().toString(a.threshold())
<< a.raw()
<< a.assessmentToString()
<< a.value()
@ -156,7 +156,7 @@ QString SmartDialog::toHtml() const
s << HtmlReport::tableLine(i18n("SMART status:"), i18nc("@label SMART disk status", "BAD"));
const QString badSectors = device().smartStatus().badSectors() > 0
? KGlobal::locale()->formatNumber(device().smartStatus().badSectors(), 0)
? QLocale().toString(device().smartStatus().badSectors())
: i18nc("@label SMART number of bad sectors", "none");
s << HtmlReport::tableLine(i18n("Model:"), device().smartStatus().modelName())
@ -165,7 +165,7 @@ QString SmartDialog::toHtml() const
<< HtmlReport::tableLine(i18n("Temperature:"), SmartStatus::tempToString(device().smartStatus().temp()))
<< HtmlReport::tableLine(i18n("Bad sectors:"), badSectors)
<< HtmlReport::tableLine(i18n("Powered on for:"), KGlobal::locale()->formatDuration(device().smartStatus().poweredOn()))
<< HtmlReport::tableLine(i18n("Power cycles:"), KGlobal::locale()->formatNumber(device().smartStatus().powerCycles(), 0))
<< HtmlReport::tableLine(i18n("Power cycles:"), QLocale().toString(device().smartStatus().powerCycles()))
<< HtmlReport::tableLine(i18n("Self tests:"), SmartStatus::selfTestStatusToString(device().smartStatus().selfTestStatus()))
<< HtmlReport::tableLine(i18n("Overall assessment:"), SmartStatus::overallAssessmentToString(device().smartStatus().overall()));
@ -185,13 +185,13 @@ QString SmartDialog::toHtml() const
{
s << "<tr>\n";
s << "<td>" << KGlobal::locale()->formatNumber(a.id(), 0) << "</td>\n"
s << "<td>" << QLocale().toString(a.id()) << "</td>\n"
<< "<td>" << QString("<b>%1</b><br/>%2").arg(a.name()).arg(st + a.desc() + "</span>") << "</td>\n"
<< "<td>" << (a.failureType() == SmartAttribute::PreFailure ? i18nc("@item:intable", "Pre-Failure") : i18nc("@item:intable", "Old-Age")) << "</td>\n"
<< "<td>" << (a.updateType() == SmartAttribute::Online ? i18nc("@item:intable", "Online") : i18nc("@item:intable", "Offline")) << "</td>\n"
<< "<td>" << KGlobal::locale()->formatNumber(a.worst(), 0) << "</td>\n"
<< "<td>" << KGlobal::locale()->formatNumber(a.current(), 0) << "</td>\n"
<< "<td>" << KGlobal::locale()->formatNumber(a.threshold(), 0) << "</td>\n"
<< "<td>" << QLocale().toString(a.worst()) << "</td>\n"
<< "<td>" << QLocale().toString(a.current()) << "</td>\n"
<< "<td>" << QLocale().toString(a.threshold()) << "</td>\n"
<< "<td>" << a.raw() << "</td>\n"
<< "<td>" << a.assessmentToString() << "</td>\n"
<< "<td>" << a.value() << "</td>\n";

View File

@ -21,7 +21,7 @@
#include "util/helpers.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QStyledItemDelegate>
#include <QPainter>

View File

@ -27,6 +27,7 @@
#include <kactioncollection.h>
#include <kiconloader.h>
#include <kfiledialog.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kstandardguiitem.h>
#include <kio/netaccess.h>

View File

@ -28,7 +28,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new BackupFileSystemJob
@param sourcedevice the device the FileSystem to back up is on

View File

@ -25,7 +25,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CheckFileSystemJob
@param p the Partition whose FileSystem is to be checked
@ -39,7 +39,7 @@ CheckFileSystemJob::CheckFileSystemJob(Partition& p) :
bool CheckFileSystemJob::run(Report& parent)
{
Report* report = jobStarted(parent);
// if we cannot check, assume everything is fine
bool rval = true;
@ -47,7 +47,7 @@ bool CheckFileSystemJob::run(Report& parent)
rval = partition().fileSystem().check(*report, partition().deviceNode());
jobFinished(*report, rval);
return rval;
}

View File

@ -28,7 +28,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CopyFileSystemJob
@param targetdevice the Device the FileSystem is to be copied to

View File

@ -31,7 +31,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CreateFileSystemJob
@param p the Partition the FileSystem to create is on
@ -48,7 +48,7 @@ bool CreateFileSystemJob::run(Report& parent)
bool rval = false;
Report* report = jobStarted(parent);
if (partition().fileSystem().supportCreate() == FileSystem::cmdSupportFileSystem)
{
if (partition().fileSystem().create(*report, partition().deviceNode()))
@ -88,5 +88,5 @@ bool CreateFileSystemJob::run(Report& parent)
QString CreateFileSystemJob::description() const
{
return i18nc("@info/plain", "Create file system %1 on partition <filename>%2</filename>", partition().fileSystem().name(), partition().deviceNode());
return i18nc("@info/plain", "Create file system <filename>%1</filename> on partition <filename>%2</filename>", partition().fileSystem().name(), partition().deviceNode());
}

View File

@ -29,7 +29,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CreatePartitionJob
@param d the Device the Partition to be created will be on

View File

@ -28,7 +28,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CreatePartitionTableJob
@param d the Device a new PartitionTable is to be created on

View File

@ -31,7 +31,7 @@
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new DeleteFileSystemJob
@param d the Device the FileSystem to delete is on

View File

@ -31,7 +31,7 @@
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new DeletePartitionJob
@param d the Device the Partition to delete is on

View File

@ -31,8 +31,8 @@
#include <QIcon>
#include <QTime>
#include <klocale.h>
#include <kiconloader.h>
#include <KLocalizedString>
Job::Job() :
m_Status(Pending)
@ -121,7 +121,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
free(buffer);
report.line() << i18ncp("@info/plain argument 2 is a string such as 7 sectors (localized accordingly)", "Copying 1 block (%2) finished.", "Copying %1 blocks (%2) finished.", blocksCopied, i18np("1 sector", "%1 sectors", target.sectorsWritten()));
report.line() << i18ncp("@info/plain argument 2 is a string such as 7 sectors (localized accordingly)", "Copying 1 block (%2) finished.", "Copying %1 blocks (%2) finished.", blocksCopied, i18np("1 sector", "%1 sectors", target.sectorsWritten()));
return rval;
}

View File

@ -26,7 +26,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new MoveFileSystemJob
@param d the Device the Partition to move is on

View File

@ -34,7 +34,7 @@
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new ResizeFileSystemJob
@param d the Device the FileSystem to be resized is on

View File

@ -34,7 +34,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new RestoreFileSystemJob
@param targetdevice the Device the FileSystem is to be restored to

View File

@ -25,7 +25,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new SetFileSystemLabelJob
@param p the Partition the FileSystem whose label is to be set is on
@ -58,7 +58,7 @@ bool SetFileSystemLabelJob::run(Report& parent)
}
jobFinished(*report, rval);
return rval;
}

View File

@ -32,7 +32,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new SetPartFlagsJob
@param d the Device the Partition whose flags are to be set is on

View File

@ -29,7 +29,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new SetPartGeometryJob
@param d the Device the Partition whose geometry is to be set is on

View File

@ -31,7 +31,7 @@
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new ShredFileSystemJob
@param d the Device the FileSystem is on

View File

@ -28,6 +28,7 @@
#include <kcmdlineargs.h>
#include <kmessagebox.h>
#include <kaboutdata.h>
#include <KLocalizedString>
#include <config.h>

View File

@ -28,7 +28,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new BackupOperation.
@param d the Device where the FileSystem to back up is on

View File

@ -29,7 +29,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CheckOperation.
@param d the Device where the Partition to check is on.
@ -69,7 +69,7 @@ bool CheckOperation::canCheck(const Partition* p)
{
if (p == NULL)
return false;
if (p->isMounted())
return false;

View File

@ -36,7 +36,7 @@
#include <QDebug>
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CopyOperation.
@param targetdevice the Device to copy the Partition to

View File

@ -31,7 +31,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CreateFileSystemOperation.
@param d the Device to create the new FileSystem on

View File

@ -27,7 +27,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new CreatePartitionTableOperation.
@param d the Device to create the new PartitionTable on

View File

@ -31,7 +31,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new DeleteOperation
@param d the Device to delete a Partition on

View File

@ -36,7 +36,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new NewOperation.
@param d the Device to create a new Partition on
@ -63,7 +63,7 @@ NewOperation::NewOperation(Device& d, Partition* p) :
// empty label). However, the user might later on decide to change FS or
// label. The operation stack will merge these operations with this one here
// and if the jobs don't exist things will break.
m_CreateFileSystemJob = new CreateFileSystemJob(targetDevice(), newPartition());
addJob(createFileSystemJob());

View File

@ -31,7 +31,7 @@
#include <QString>
#include <kiconloader.h>
#include <klocale.h>
#include <KLocalizedString>
Operation::Operation() :
m_Status(StatusNone),

View File

@ -38,7 +38,7 @@
#include <QDebug>
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new ResizeOperation.
@param d the Device to resize a Partition on

View File

@ -40,7 +40,7 @@
#include <QString>
#include <QFileInfo>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new RestoreOperation.
@param d the Device to restore the Partition to

View File

@ -28,7 +28,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new SetFileSystemLabelOperation.
@param p the Partition with the FileSystem to set the label for

View File

@ -30,7 +30,7 @@
#include <QString>
#include <klocale.h>
#include <KLocalizedString>
/** Creates a new SetPartFlagsOperation.
@param d the Device on which the Partition to set flags for is

View File

@ -32,7 +32,7 @@
#include <QString>
#include <QStringList>
#include <klocale.h>
#include <KLocalizedString>
#include <kpluginfactory.h>
#include <kaboutdata.h>

View File

@ -25,8 +25,6 @@
#include "util/globallog.h"
#include "util/report.h"
#include <klocale.h>
DummyDevice::DummyDevice(const QString& device_node) :
CoreBackendDevice(device_node)
{

View File

@ -22,8 +22,6 @@
#include "util/report.h"
#include <klocale.h>
DummyPartition::DummyPartition() :
CoreBackendPartition()
{

View File

@ -28,8 +28,6 @@
#include "util/report.h"
#include <klocale.h>
#include <unistd.h>
DummyPartitionTable::DummyPartitionTable() :

View File

@ -43,7 +43,7 @@
#include <QStringList>
#include <QDebug>
#include <klocale.h>
#include <KLocalizedString>
#include <kmountpoint.h>
#include <kdiskfreespaceinfo.h>
#include <kpluginfactory.h>

View File

@ -25,7 +25,7 @@
#include "util/globallog.h"
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
#include <unistd.h>

View File

@ -22,7 +22,7 @@
#include "util/report.h"
#include <klocale.h>
#include <KLocalizedString>
LibPartedPartition::LibPartedPartition(PedPartition* ped_partition) :
CoreBackendPartition(),

View File

@ -32,7 +32,7 @@
#include "util/report.h"
#include "util/externalcommand.h"
#include <klocale.h>
#include <KLocalizedString>
#include <unistd.h>
@ -323,7 +323,7 @@ bool LibPartedPartitionTable::resizeFileSystem(Report& report, const Partition&
Q_UNUSED(partition);
Q_UNUSED(newLength);
#endif
return rval;
}

View File

@ -26,7 +26,7 @@
#include <QString>
#include <QStringList>
#include <KLocale>
#include <KLocalizedString>
/** Creates a new ExternalCommand instance without Report.
@param cmd the command to run

View File

@ -24,8 +24,8 @@
#include "ops/operation.h"
#include <klocale.h>
#include <kaboutdata.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kglobal.h>
#include <kcomponentdata.h>

View File

@ -25,7 +25,7 @@
#include <kglobal.h>
#include <kaboutdata.h>
#include <kdatetime.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kglobalsettings.h>
#include <kcomponentdata.h>
@ -77,7 +77,7 @@ QString HtmlReport::header()
const QString unameString = QString(info.sysname) + ' ' + info.nodename + ' ' + info.release + ' ' + info.version + ' ' + info.machine;
s << "<table>\n"
<< tableLine(i18n("Date:"), KGlobal::locale()->formatDateTime(KDateTime::currentLocalDateTime()))
<< tableLine(i18n("Date:"), QLocale().toString(QDateTime::currentDateTime(), QLocale::ShortFormat))
<< tableLine(i18n("Program version:"), KGlobal::mainComponent().aboutData()->version())
<< tableLine(i18n("Backend:"), QString("%1 (%2)").arg(CoreBackendManager::self()->backend()->about().programName()).arg(CoreBackendManager::self()->backend()->about().version()))
<< tableLine(i18n("KDE version:"), KDE_VERSION_STRING)

View File

@ -29,7 +29,7 @@
#include <kdatetime.h>
#include <kglobal.h>
#include <kaboutdata.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kcomponentdata.h>
#include <sys/utsname.h>