]> cloud.milkyroute.net Git - dolphin.git/commitdiff
SVN_SILENT coding style fixes
authorPeter Penz <peter.penz19@gmail.com>
Tue, 4 Dec 2007 21:05:41 +0000 (21:05 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 4 Dec 2007 21:05:41 +0000 (21:05 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=744903

src/dolphinmodel.cpp
src/dolphinview.cpp
src/dolphinview.h

index d568902510bc46ab600e65ffb2b972e85d7a9571..e74df4d3f01f14a34df22b17e072377281f96dc0 100644 (file)
@@ -85,31 +85,35 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
                     if (!item.isHidden() && name.at(0).isLetter())
                         retString = name.at(0).toUpper();
                     else if (item.isHidden()) {
                     if (!item.isHidden() && name.at(0).isLetter())
                         retString = name.at(0).toUpper();
                     else if (item.isHidden()) {
-                        if(name.at(0) == '.') {
-                            if(name.size() > 1 && name.at(1).isLetter())
+                        if (name.at(0) == '.') {
+                            if (name.size() > 1 && name.at(1).isLetter()) {
                                 retString = name.at(1).toUpper();
                                 retString = name.at(1).toUpper();
-                            else
+                            } else {
                                 retString = i18nc("@title:group Name", "Others");
                                 retString = i18nc("@title:group Name", "Others");
-                        } else
+                            }
+                        } else {
                             retString = name.at(0).toUpper();
                             retString = name.at(0).toUpper();
+                        }
                     } else {
                         bool validCategory = false;
 
                         const QString str(name.toUpper());
                         const QChar* currA = str.unicode();
                         while (!currA->isNull() && !validCategory) {
                     } else {
                         bool validCategory = false;
 
                         const QString str(name.toUpper());
                         const QChar* currA = str.unicode();
                         while (!currA->isNull() && !validCategory) {
-                            if (currA->isLetter())
+                            if (currA->isLetter()) {
                                 validCategory = true;
                                 validCategory = true;
-                            else if (currA->isDigit())
+                            } else if (currA->isDigit()) {
                                 return i18nc("@title:group", "Others");
                                 return i18nc("@title:group", "Others");
-                            else
+                            } else {
                                 ++currA;
                                 ++currA;
+                            }
                         }
 
                         }
 
-                        if (!validCategory)
-                            retString = i18nc("@title:group Name", "Others");
-                        else
+                        if (!validCategory) {
+                            retString = validCategory ? *currA : i18nc("@title:group Name", "Others");
+                        } else {
                             retString = *currA;
                             retString = *currA;
+                        }
                     }
                 }
                 break;
                     }
                 }
                 break;
@@ -214,9 +218,9 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
             case DolphinModel::Tags: {
                 retString = tagsForIndex(index);
 
             case DolphinModel::Tags: {
                 retString = tagsForIndex(index);
 
-                if (retString.isEmpty())
+                if (retString.isEmpty()) {
                     retString = i18nc("@title:group Tags", "Not yet tagged");
                     retString = i18nc("@title:group Tags", "Not yet tagged");
-
+                }
                 break;
             }
 #endif
                 break;
             }
 #endif
index 41bee6972315c62846ee2ffd4933ffb377c3a604..0b8fe5883dfb7c2b836fca40fdd6657abacddebb 100644 (file)
@@ -861,10 +861,11 @@ void DolphinView::createView()
     view->setItemDelegate(m_fileItemDelegate);
 
     view->setModel(m_proxyModel);
     view->setItemDelegate(m_fileItemDelegate);
 
     view->setModel(m_proxyModel);
-    if(m_selectionModel)
-       view->setSelectionModel(m_selectionModel);
-    else
+    if (m_selectionModel != 0) {
+        view->setSelectionModel(m_selectionModel);
+    } else {
         m_selectionModel = view->selectionModel();
         m_selectionModel = view->selectionModel();
+    }
 
     m_selectionModel->setParent(this);  //Reparent the selection model.  We do not want it to be deleted when we delete the model
 
 
     m_selectionModel->setParent(this);  //Reparent the selection model.  We do not want it to be deleted when we delete the model
 
index 4a2f5be02530813c9bc7acb1291e5ae38f36799d..508862e9c5ba1fffa87d3456b7ccaddf97ed9998 100644 (file)
@@ -690,7 +690,7 @@ private:
     DolphinDetailsView* m_detailsView;
     DolphinColumnView* m_columnView;
     KFileItemDelegate* m_fileItemDelegate;
     DolphinDetailsView* m_detailsView;
     DolphinColumnView* m_columnView;
     KFileItemDelegate* m_fileItemDelegate;
-    QItemSelectionModel *m_selectionModel;
+    QItemSelectionModelm_selectionModel;
 
     DolphinModel* m_dolphinModel;
     KDirLister* m_dirLister;
 
     DolphinModel* m_dolphinModel;
     KDirLister* m_dirLister;