]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Minor coding style fixes
authorPeter Penz <peter.penz19@gmail.com>
Sat, 26 May 2012 11:46:10 +0000 (13:46 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 26 May 2012 11:46:30 +0000 (13:46 +0200)
src/kitemviews/kfileitemmodel.cpp
src/panels/places/placesitemmodel.cpp
src/panels/terminal/terminalpanel.cpp
src/settings/applyviewpropsjob.cpp
src/settings/general/previewssettingspage.cpp

index 9f92d8a81fdc832ac45751031728efaa101a1a72..62881e132dbe86c500528f88e87e7abc55e80c9a 100644 (file)
@@ -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.
         // 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);
             const int index = m_items.value(url, -1);
             if (index >= 0) {
                 m_urlsToExpand.remove(url);
index 6723391db4efff3d2765bf17bb6389fe00e74e57..ca79acb95cc97d616a13769b967cbff1ffa5e0a9 100644 (file)
@@ -816,7 +816,7 @@ void PlacesItemModel::initializeAvailableDevices()
     connect(notifier, SIGNAL(deviceRemoved(QString)), this, SLOT(slotDeviceRemoved(QString)));
 
     const QList<Solid::Device>& deviceList = Solid::Device::listFromQuery(m_predicate);
     connect(notifier, SIGNAL(deviceRemoved(QString)), this, SLOT(slotDeviceRemoved(QString)));
 
     const QList<Solid::Device>& deviceList = Solid::Device::listFromQuery(m_predicate);
-    foreach(const Solid::Device& device, deviceList) {
+    foreach (const Solid::Device& device, deviceList) {
         m_availableDevices << device.udi();
     }
 }
         m_availableDevices << device.udi();
     }
 }
index b3bbe11e832ac714bc848221c6e8bfe4dd4ef297..c307ce71bbcd9886812a5c81c55f6c527d9ddc9f 100644 (file)
@@ -103,7 +103,7 @@ void TerminalPanel::showEvent(QShowEvent* event)
         m_clearTerminal = true;
         KPluginFactory* factory = 0;
         KService::Ptr service = KService::serviceByDesktopName("konsolepart");
         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<KParts::ReadOnlyPart>(this)) : 0;
             factory = KPluginLoader(service->library()).factory();
         }
         m_konsolePart = factory ? (factory->create<KParts::ReadOnlyPart>(this)) : 0;
index 7ed9302c7ed646bbffd6c22dfa084e96eda1c741..4bc77caee77473367817842116226519470c9149 100644 (file)
@@ -51,9 +51,9 @@ ApplyViewPropsJob::~ApplyViewPropsJob()
 
 void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list)
 {
 
 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);
         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);
             ++m_progress;
 
             KUrl url(m_dir);
index c76f4ca24fe323f28d4e5ed4e4edd3d70facc8b7..38b61b9965f5f9da9727d0fe523ee6deeedf9804 100644 (file)
@@ -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.
     // 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);
         m_enabledPreviewPlugins.removeAll(QLatin1String("jpegrotatedthumbnail"));
         m_enabledPreviewPlugins.append(QLatin1String("jpegthumbnail"));
         globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins);