diff --git a/src/config/configurepageadvanced.ui b/src/config/configurepageadvanced.ui index 905a3b3..f69929c 100644 --- a/src/config/configurepageadvanced.ui +++ b/src/config/configurepageadvanced.ui @@ -93,7 +93,7 @@ - + Byte diff --git a/src/core/device.h b/src/core/device.h index 4a289d8..bc8419e 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -64,7 +64,7 @@ class LIBPARTITIONMANAGERPRIVATE_EXPORT Device : public QObject qint32 heads() const { return m_Heads; } /**< @return the number of heads on the Device in CHS notation */ qint32 cylinders() const { return m_Cylinders; } /**< @return the number of cylinders on the Device in CHS notation */ qint32 sectorsPerTrack() const { return m_SectorsPerTrack; } /**< @return the number of sectors on the Device in CHS notation */ - qint32 physicalSectorSize() const { return m_PhysicalSectorSize; } /**< @return the phyiscal sector size the Device uses or -1 if unknown */ + qint32 physicalSectorSize() const { return m_PhysicalSectorSize; } /**< @return the physical sector size the Device uses or -1 if unknown */ qint32 logicalSectorSize() const { return m_LogicalSectorSize; } /**< @return the logical sector size the Device uses */ qint64 totalSectors() const { return static_cast(heads()) * cylinders() * sectorsPerTrack(); } /**< @return the total number of sectors on the device */ qint64 capacity() const { return totalSectors() * logicalSectorSize(); } /**< @return the Device's capacity in bytes */ diff --git a/src/core/mountentry.h b/src/core/mountentry.h index 7b7a387..24ac4f4 100644 --- a/src/core/mountentry.h +++ b/src/core/mountentry.h @@ -17,6 +17,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#if !defined(MOUNTENTRY__H) + +#define MOUNTENTRY__H + #include #include #include @@ -42,3 +46,4 @@ class MountEntry IdentifyType identifyType; }; +#endif diff --git a/src/fs/filesystem.h b/src/fs/filesystem.h index 8df73a2..4004466 100644 --- a/src/fs/filesystem.h +++ b/src/fs/filesystem.h @@ -46,7 +46,7 @@ class FileSystem class SupportTool { public: - SupportTool(const QString& n = QString(), const KUrl& u = KUrl()) : name(n), url(u) {} + explicit SupportTool(const QString& n = QString(), const KUrl& u = KUrl()) : name(n), url(u) {} const QString name; const KUrl url; diff --git a/src/gui/applyprogressdialog.cpp b/src/gui/applyprogressdialog.cpp index 60c325c..3af263c 100644 --- a/src/gui/applyprogressdialog.cpp +++ b/src/gui/applyprogressdialog.cpp @@ -48,7 +48,6 @@ #include #include #include -#include const QString ApplyProgressDialog::m_TimeFormat = "hh:mm:ss"; diff --git a/src/gui/createpartitiontabledialog.cpp b/src/gui/createpartitiontabledialog.cpp index 43ae6ed..9b1aabb 100644 --- a/src/gui/createpartitiontabledialog.cpp +++ b/src/gui/createpartitiontabledialog.cpp @@ -66,4 +66,5 @@ void CreatePartitionTableDialog::onMSDOSToggled(bool on) widget().radioGPT().setChecked(true); } } -} \ No newline at end of file +} + diff --git a/src/gui/editmountpointdialogwidget.cpp b/src/gui/editmountpointdialogwidget.cpp index e8d2f05..c5059c9 100644 --- a/src/gui/editmountpointdialogwidget.cpp +++ b/src/gui/editmountpointdialogwidget.cpp @@ -200,7 +200,7 @@ bool EditMountPointDialogWidget::readMountpoints(const QString& filename) type = MountEntry::label; device = findBlkIdDevice("LABEL", QString(device).remove("LABEL=")); } - else if (device.startsWith("/")) + else if (device.startsWith('/')) device = QFile::symLinkTarget(device); if (!device.isEmpty()) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index bf64cae..83c934d 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -759,7 +759,7 @@ void MainWindow::onImportPartitionTable() QString fileName; if (!KIO::NetAccess::download(url, fileName, this)) { - KMessageBox::error(this, i18nc("@info", "Could not open input file %1 for import: %s", url.fileName(), KIO::NetAccess::lastErrorString()), i18nc("@title:window", "Error Importing Partition Table")); + KMessageBox::error(this, i18nc("@info", "Could not open input file %1 for import: %2", url.fileName(), KIO::NetAccess::lastErrorString()), i18nc("@title:window", "Error Importing Partition Table")); return; } @@ -844,8 +844,8 @@ void MainWindow::onImportPartitionTable() qint64 lastSector = rxPartition.cap(3).toLongLong(); QString fsName = rxPartition.cap(4); QString roleNames = rxPartition.cap(5); - QString volumeLabel = rxPartition.cap(6).replace('"', ""); - QStringList flags = rxPartition.cap(7).replace('"', "").split(','); + QString volumeLabel = rxPartition.cap(6).replace('"', QString()); + QStringList flags = rxPartition.cap(7).replace('"', QString()).split(','); if (firstSector < ptable->firstUsable() || lastSector > ptable->lastUsable()) { diff --git a/src/gui/partresizerwidget.cpp b/src/gui/partresizerwidget.cpp index ebba6a7..23babe9 100644 --- a/src/gui/partresizerwidget.cpp +++ b/src/gui/partresizerwidget.cpp @@ -87,7 +87,7 @@ void PartResizerWidget::init(Device& d, Partition& p, qint64 minFirst, qint64 ma setMinimumLength(qMax(partition().sectorsUsed(), partition().minimumSectors())); setMaximumLength(qMin(totalSectors(), partition().maximumSectors())); - // set margins to accomodate for top/bottom button asymmetric layouts + // set margins to accommodate to top/bottom button asymmetric layouts QStyleOptionButton bOpt; bOpt.initFrom(this); diff --git a/src/gui/partwidget.h b/src/gui/partwidget.h index ce441f9..2b1a36c 100644 --- a/src/gui/partwidget.h +++ b/src/gui/partwidget.h @@ -41,7 +41,7 @@ class PartWidget : public PartWidgetBase Q_OBJECT public: - PartWidget(QWidget* parent, const Partition* p = NULL); + explicit PartWidget(QWidget* parent, const Partition* p = NULL); public: void init(const Partition* p); diff --git a/src/gui/sizedialogbase.cpp b/src/gui/sizedialogbase.cpp index 9f796fd..488ef5f 100644 --- a/src/gui/sizedialogbase.cpp +++ b/src/gui/sizedialogbase.cpp @@ -21,7 +21,6 @@ #include "gui/sizedetailswidget.h" #include "gui/partresizerwidget.h" #include "gui/sizedialogwidget.h" -#include "gui/sizedetailswidget.h" #include "core/partitiontable.h" #include "core/device.h" diff --git a/src/gui/smartdialog.cpp b/src/gui/smartdialog.cpp index 13dc9e3..c480cb0 100644 --- a/src/gui/smartdialog.cpp +++ b/src/gui/smartdialog.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/src/plugins/libparted/libpartedbackend.cpp b/src/plugins/libparted/libpartedbackend.cpp index bbe7c76..34634bd 100644 --- a/src/plugins/libparted/libpartedbackend.cpp +++ b/src/plugins/libparted/libpartedbackend.cpp @@ -519,7 +519,7 @@ FileSystem::Type LibPartedBackend::detectFileSystem(PedPartition* pedPartition) else if (s == "ufs") rval = FileSystem::Ufs; else if (s == "vfat" && pedPartition->fs_type != NULL) { - // libblkid does not distinguish betweeen fat16 and fat32, so we're still using libparted + // libblkid does not distinguish between fat16 and fat32, so we're still using libparted // for those if (strcmp(pedPartition->fs_type->name, "fat16") == 0) rval = FileSystem::Fat16; diff --git a/src/util/helpers.cpp b/src/util/helpers.cpp index 3531a59..eefc21b 100644 --- a/src/util/helpers.cpp +++ b/src/util/helpers.cpp @@ -233,7 +233,7 @@ QList getSolidDeviceList() if (args->count() > 1) predicate += "] "; - predicate += "]"; + predicate += ']'; } kDebug() << predicate;