From e76ec71536d7b2a82b22e20474838a244a4bb8d6 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 26 May 2012 13:46:10 +0200 Subject: [PATCH] Minor coding style fixes --- src/kitemviews/kfileitemmodel.cpp | 2 +- src/panels/places/placesitemmodel.cpp | 2 +- src/panels/terminal/terminalpanel.cpp | 2 +- src/settings/applyviewpropsjob.cpp | 4 ++-- src/settings/general/previewssettingspage.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 9f92d8a81..62881e132 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -653,7 +653,7 @@ void KFileItemModel::slotCompleted() // Note that the parent folder must be expanded before any of its subfolders become visible. // Therefore, some URLs in m_restoredExpandedUrls might not be visible yet // -> we expand the first visible URL we find in m_restoredExpandedUrls. - foreach(const KUrl& url, m_urlsToExpand) { + foreach (const KUrl& url, m_urlsToExpand) { const int index = m_items.value(url, -1); if (index >= 0) { m_urlsToExpand.remove(url); diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 6723391db..ca79acb95 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -816,7 +816,7 @@ void PlacesItemModel::initializeAvailableDevices() connect(notifier, SIGNAL(deviceRemoved(QString)), this, SLOT(slotDeviceRemoved(QString))); const QList& deviceList = Solid::Device::listFromQuery(m_predicate); - foreach(const Solid::Device& device, deviceList) { + foreach (const Solid::Device& device, deviceList) { m_availableDevices << device.udi(); } } diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index b3bbe11e8..c307ce71b 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -103,7 +103,7 @@ void TerminalPanel::showEvent(QShowEvent* event) m_clearTerminal = true; KPluginFactory* factory = 0; KService::Ptr service = KService::serviceByDesktopName("konsolepart"); - if(service) { + if (service) { factory = KPluginLoader(service->library()).factory(); } m_konsolePart = factory ? (factory->create(this)) : 0; diff --git a/src/settings/applyviewpropsjob.cpp b/src/settings/applyviewpropsjob.cpp index 7ed9302c7..4bc77caee 100644 --- a/src/settings/applyviewpropsjob.cpp +++ b/src/settings/applyviewpropsjob.cpp @@ -51,9 +51,9 @@ ApplyViewPropsJob::~ApplyViewPropsJob() void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list) { - foreach(const KIO::UDSEntry& entry, list) { + foreach (const KIO::UDSEntry& entry, list) { const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME); - if ((name != ".") && (name != "..") && entry.isDir()) { + if (name != QLatin1String(".") && name != QLatin1String("..") && entry.isDir()) { ++m_progress; KUrl url(m_dir); diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index c76f4ca24..38b61b996 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -188,7 +188,7 @@ void PreviewsSettingsPage::loadSettings() // Note that the upgrade to the correct plugin is done already in KFilePreviewGenerator. However, if Konqueror is // opened in web browsing mode and the Settings dialog is opened, we might end up here before KFilePreviewGenerator's // constructor is ever called -> the plugin replacement should be done here as well. - if(m_enabledPreviewPlugins.contains(QLatin1String("jpegrotatedthumbnail"))) { + if (m_enabledPreviewPlugins.contains(QLatin1String("jpegrotatedthumbnail"))) { m_enabledPreviewPlugins.removeAll(QLatin1String("jpegrotatedthumbnail")); m_enabledPreviewPlugins.append(QLatin1String("jpegthumbnail")); globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins); -- 2.47.3