[krusader] /: Several not-interrelated minor changes that were pending

Toni Asensi Esteve null at kde.org
Tue Mar 3 22:56:02 GMT 2020


Git commit 0dfa7d387e510699ddf48ceb04d2aea061f980b9 by Toni Asensi Esteve.
Committed on 03/03/2020 at 22:54.
Pushed by asensi into branch 'master'.

Several not-interrelated minor changes that were pending

In more detail:
    - Some adaptations due to the code style.
    - Some changes that @abika proposed in https://phabricator.kde.org/D24987.
    - Some comments were improved or added.
    - In one line: `sym link` was replaced with `symlink`, as in all the source code of Krusader.
    - A `KMessageBox::sorry()` is used the same way that it's utilized in `void ListPanelFunc::editFile(const QUrl &filePath)`, where it's written `KMessageBox::sorry(krMainWindow, i18n("You cannot edit a folder"));`.

Differential Revision: https://phabricator.kde.org/D27609

M  +3    -1    doc/index.docbook
M  +1    -1    krusader/FileSystem/fileitem.h
M  +4    -3    krusader/Panel/panelfunc.cpp
M  +1    -1    krusader/krglobal.cpp
M  +4    -2    krusader/krslots.cpp

https://commits.kde.org/krusader/0dfa7d387e510699ddf48ceb04d2aea061f980b9

diff --git a/doc/index.docbook b/doc/index.docbook
index 85d6f16b..6a346934 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -25,11 +25,13 @@
 <!ENTITY krusader 'Krusader'>
 <!ENTITY kapp "&krusader;">
 <!ENTITY kappname "&krusader;">
+
+<!-- In order to build Krusader using Ubuntu 18.04 LTS, related ones like Kubuntu, and in docs.kde.org -->
 <!ENTITY NFS   "<acronym>NFS</acronym>">
 <!ENTITY USB   "<acronym>USB</acronym>">
 <!ENTITY Samba "<application>Samba</application>">
 
-<!-- For the 16.04 LTS version of Ubuntu (or Kubuntu, etc.) -->
+<!-- In order to build Krusader using Ubuntu 16.04 LTS and related ones like Kubuntu, etc. -->
 <!ENTITY Left "<keycap>Left</keycap>">
 <!ENTITY Right "<keycap>Right</keycap>">
 <!ENTITY Up "<keycap>Up</keycap>">
diff --git a/krusader/FileSystem/fileitem.h b/krusader/FileSystem/fileitem.h
index d07c8943..b25a607b 100644
--- a/krusader/FileSystem/fileitem.h
+++ b/krusader/FileSystem/fileitem.h
@@ -153,7 +153,7 @@ private:
     QString m_group;            //< file group name
 
     bool m_isLink;              //< true if the file is a symlink
-    QString m_linkDest;         //< if it's a sym link - its destination
+    QString m_linkDest;         //< if it's a symlink - its destination
     bool m_isBrokenLink;        //< true if the link destination does not exist
 
     QString m_permissions;      //< file permissions string
diff --git a/krusader/Panel/panelfunc.cpp b/krusader/Panel/panelfunc.cpp
index adc83d18..ec402077 100644
--- a/krusader/Panel/panelfunc.cpp
+++ b/krusader/Panel/panelfunc.cpp
@@ -506,8 +506,9 @@ void ListPanelFunc::askEditFile()
     // ask the user for the filename to edit
     const QUrl filePath = KChooseDir::getFile(i18n("Enter the filename to edit:"),
                                        QUrl(panel->getCurrentName()), panel->virtualPath());
-    if(filePath.isEmpty())
-        return ;   // the user canceled
+    if (filePath.isEmpty()) {
+        return;   // the user canceled
+    }
 
     if (filePath.isLocalFile()) {
         // if the file exists, edit it instead of creating a new one
@@ -561,7 +562,7 @@ void ListPanelFunc::slotStatEdit(KJob* job)
     }
 
     if (statJob->statResult().isDir()) {
-        KMessageBox::error(nullptr, i18n("You cannot edit a folder"));
+        KMessageBox::sorry(nullptr, i18n("You cannot edit a folder"));
         return;
     }
 
diff --git a/krusader/krglobal.cpp b/krusader/krglobal.cpp
index e7a40b4e..f71d737e 100644
--- a/krusader/krglobal.cpp
+++ b/krusader/krglobal.cpp
@@ -32,7 +32,7 @@
 KConfig *KrGlobal::config = nullptr;
 KMountMan *KrGlobal::mountMan = nullptr;
 KrBookmarkHandler *KrGlobal::bookman = nullptr;
-KRslots* KrGlobal::slot = nullptr;
+KRslots *KrGlobal::slot = nullptr;
 KrusaderView *KrGlobal::mainView = nullptr;
 QWidget *KrGlobal::mainWindow = nullptr;
 UserAction *KrGlobal::userAction = nullptr;
diff --git a/krusader/krslots.cpp b/krusader/krslots.cpp
index 2f4b97d5..b29d652b 100644
--- a/krusader/krslots.cpp
+++ b/krusader/krslots.cpp
@@ -225,8 +225,9 @@ void KRslots::compareContent(const QUrl& url1, const QUrl& url2)
         } else tmp1 = url1.path();
         if (!url2.isLocalFile()) {
             if (!downloadToTemp(url2, tmp2)) {
-                if (tmp1 != url1.path())
+                if (tmp1 != url1.path()) {
                     QFile::remove(tmp1);
+                }
                 return;
             }
         } else tmp2 = url2.path();
@@ -236,8 +237,9 @@ void KRslots::compareContent(const QUrl& url1, const QUrl& url2)
                                  tmp2 != url2.path() ? tmp2 : QString());
     *p << diffProg << tmp1 << tmp2;
     p->start();
-    if (!p->waitForStarted())
+    if (!p->waitForStarted()) {
         KMessageBox::error(nullptr, i18n("Error executing %1.", diffProg));
+    }
 }
 
 // GUI toggle slots


More information about the kde-doc-english mailing list