]> gitweb.hamatoma.de Git - reqt/commitdiff
ReFind: small improvements, e.g. layout
authorhama <hama@siduction.net>
Sun, 20 Dec 2015 23:10:23 +0000 (00:10 +0100)
committerhama <hama@siduction.net>
Sun, 20 Dec 2015 23:10:23 +0000 (00:10 +0100)
appl/refind/mainwindow.cpp
appl/refind/mainwindow.ui
appl/refind/refind.pro
base/rebase.hpp
gui/ReGuiQueue.cpp

index a40959adfb5d4830408390391b2be3ab8c8294b5..0e6b151217c85f7a4af8ca51694edc304acef6ea 100644 (file)
 const QString VERSION("2015.12.15");
 
 inline QString addEsc(const QString& text){
-    QString rc = text;
+       QString rc = text;
 #if defined WIN32
-    rc.replace("\\", "\\\\");
+       rc.replace("\\", "\\\\");
 #endif
-    return rc;
+       return rc;
 }
 
 /**
@@ -254,10 +254,10 @@ QString replaceEscSequences(const QString& text){
    QString rc = text;
    int start = 0;
    while (start < rc.length()){
-      int ix = text.indexOf('\\', start);
-      if (ix < 0)
+         int ix = text.indexOf('\\', start);
+         if (ix < 0)
                 break;
-      start += ix;
+         start += ix;
          QChar replacement = 0;
          switch (text[start + 1].toLatin1()) {
          case 'n':
@@ -273,8 +273,8 @@ QString replaceEscSequences(const QString& text){
                 replacement = text[start + 1];
                 break;
          }
-      rc.replace(start, 2, replacement);
-      start++;
+         rc.replace(start, 2, replacement);
+         start++;
    }
    return rc;
 }
@@ -342,12 +342,12 @@ void MainWindow::exportToStream(QTextStream& stream, int maxRow){
    for (int ii = 0; ii < count; ii++){
          QString line = ui->comboBoxTemplate->currentText();
          QMap < QString, QString > placeholders;
-      QString path = m_lastBaseDir.absoluteFilePath(
+         QString path = m_lastBaseDir.absoluteFilePath(
                 ReFileUtils::pathAppend(ui->tableWidget->item(ii, TC_PATH)->text(),
                        ui->tableWidget->item(ii, TC_NODE)->text()));
-      placeholders.insert("full", addEsc(ReQStringUtils::nativePath(path)));
-      path = ReFileUtils::nativePath(ui->tableWidget->item(ii, TC_PATH)->text());
-      placeholders.insert("path", addEsc(path));
+         placeholders.insert("full", addEsc(ReQStringUtils::nativePath(path)));
+         path = ReFileUtils::nativePath(ui->tableWidget->item(ii, TC_PATH)->text());
+         placeholders.insert("path", addEsc(path));
          placeholders.insert("ext", ui->tableWidget->item(ii, TC_EXT)->text());
          placeholders.insert("node", ui->tableWidget->item(ii, TC_NODE)->text());
          placeholders.insert("modified",
@@ -730,7 +730,7 @@ msgBox.exec();
  */
 void MainWindow::buildGlobalPlaceholders(QMap <QString, QString>& hash){
 
-    hash.insert("filepatterns", ui->comboBoxFilePatterns->currentText());
+       hash.insert("filepatterns", ui->comboBoxFilePatterns->currentText());
        hash.insert("base", m_lastBaseDir.absolutePath());
        hash.insert("textpattern", addEsc(ui->comboBoxTextPattern->currentText()));
        hash.insert("dirs", QString::number(m_statistics.m_dirs));
@@ -885,7 +885,7 @@ void MainWindow::search(){
        else{
                QApplication::setOverrideCursor (QCursor(Qt::WaitCursor));
                ui->pushButtonSearch->setEnabled(false);
-               ui->pushButtonSearch->setEnabled(false);
+               ui->pushButtonSearch2->setEnabled(false);
                if (m_finder == NULL)
                        m_finder = new FileFinder;
                populateFinder(*m_finder);
index 588902498852ffa1d057a7810fdfae5013cf8e26..4a6ef11f009b5f51c983b3a01b7a32b3c0d32e71 100644 (file)
@@ -43,7 +43,7 @@
          </attribute>
          <layout class="QHBoxLayout" name="horizontalLayout_4">
           <item>
-           <layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0,0">
+           <layout class="QGridLayout" name="gridLayout" columnstretch="0,4,1,0,0,1,2">
             <item row="3" column="0" colspan="2">
              <widget class="QPushButton" name="pushButtonSearch">
               <property name="toolTip">
               </property>
              </widget>
             </item>
-            <item row="1" column="5" colspan="2">
-             <layout class="QHBoxLayout" name="horizontalLayout">
-              <item>
-               <widget class="QCheckBox" name="checkBoxDirs">
-                <property name="minimumSize">
-                 <size>
-                  <width>75</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize">
-                 <size>
-                  <width>100</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-                <property name="text">
-                 <string>Dirs</string>
-                </property>
-                <property name="checked">
-                 <bool>true</bool>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QCheckBox" name="checkBoxLinks">
-                <property name="minimumSize">
-                 <size>
-                  <width>75</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize">
-                 <size>
-                  <width>100</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-                <property name="text">
-                 <string>Links</string>
-                </property>
-                <property name="checked">
-                 <bool>true</bool>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <spacer name="horizontalSpacer_2">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-                <property name="sizeHint" stdset="0">
-                 <size>
-                  <width>40</width>
-                  <height>20</height>
-                 </size>
-                </property>
-               </spacer>
-              </item>
-             </layout>
-            </item>
             <item row="2" column="1">
              <widget class="QComboBox" name="comboBoxTextPattern">
               <property name="minimumSize">
               </property>
              </widget>
             </item>
-            <item row="2" column="5" colspan="2">
-             <layout class="QHBoxLayout" name="horizontalLayout_5">
-              <item>
-               <widget class="QCheckBox" name="checkBoxRegExpr">
-                <property name="minimumSize">
-                 <size>
-                  <width>130</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize">
-                 <size>
-                  <width>200</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-                <property name="text">
-                 <string>Regular expr.</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QCheckBox" name="checkBoxBinaryFiles">
-                <property name="minimumSize">
-                 <size>
-                  <width>150</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize">
-                 <size>
-                  <width>200</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-                <property name="text">
-                 <string>Binary files</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <spacer name="horizontalSpacer_3">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-                <property name="sizeHint" stdset="0">
-                 <size>
-                  <width>40</width>
-                  <height>20</height>
-                 </size>
-                </property>
-               </spacer>
-              </item>
-             </layout>
-            </item>
             <item row="2" column="2">
              <widget class="QCheckBox" name="checkBoxTextIgnoreCase">
               <property name="maximumSize">
               </property>
              </widget>
             </item>
+            <item row="1" column="5">
+             <layout class="QHBoxLayout" name="horizontalLayout">
+              <item>
+               <widget class="QCheckBox" name="checkBoxDirs">
+                <property name="minimumSize">
+                 <size>
+                  <width>75</width>
+                  <height>0</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>100</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>Dirs</string>
+                </property>
+                <property name="checked">
+                 <bool>true</bool>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QCheckBox" name="checkBoxLinks">
+                <property name="minimumSize">
+                 <size>
+                  <width>75</width>
+                  <height>0</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>100</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>Links</string>
+                </property>
+                <property name="checked">
+                 <bool>true</bool>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer_2">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
+            </item>
+            <item row="2" column="5">
+             <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="2,1,0">
+              <item>
+               <widget class="QCheckBox" name="checkBoxRegExpr">
+                <property name="minimumSize">
+                 <size>
+                  <width>130</width>
+                  <height>0</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>200</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>Regular expr.</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QCheckBox" name="checkBoxBinaryFiles">
+                <property name="minimumSize">
+                 <size>
+                  <width>150</width>
+                  <height>0</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>200</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>Binary files</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer_3">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
+            </item>
            </layout>
           </item>
          </layout>
index 15555660373bef2cd384f5e09e2f783fbbb3a0cc..7c5b8075c0ba7f38787b54252851e0335f5da380 100644 (file)
@@ -31,8 +31,7 @@ SOURCES += main.cpp\
         dialogfileplaceholder.cpp \
         utils.cpp \
         dialogoptions.cpp \
-        filetablewidget.cpp \
-    ../../gui/ReGuiQueue.cpp
+        filetablewidget.cpp
 
 
 HEADERS  += mainwindow.hpp \
@@ -48,7 +47,7 @@ HEADERS  += mainwindow.hpp \
         utils.hpp \
         dialogoptions.hpp \
         filetablewidget.hpp \
-    ../../gui/ReGuiQueue.hpp
+       ../../gui/ReGuiQueue.hpp
 
 
 FORMS    += mainwindow.ui \
index 8c7577c615fa4eb43e9fa6f8e2482af4a61f4c35..c4d6aa151e2d8e9693f4645a6960768cdf6580c2 100644 (file)
@@ -69,6 +69,7 @@ typedef QString ReString;
 #define _memicmp memicmp
 #define _mkdir(path) mkdir(path, -1)
 #define _rmdir rmdir
+#define _unlink unlink
 #else
 #define _strcasecmp _stricmp
 #define OS_SEPARATOR '\\'
index ad3f486794ecfa0af10d70470bfeaa89371ea504..8657ef3a2a3e3ec99878bb4b47eed3a919ff513f 100644 (file)
@@ -13,7 +13,7 @@
  * Constructor.
  */
 ReGuiQueue::ReGuiQueue() :
-    QVector<ReGuiQueueItem>(),
+       QVector<ReGuiQueueItem>(),
        m_locker()
 {
 }