From: hama Date: Sun, 20 Dec 2015 23:10:23 +0000 (+0100) Subject: ReFind: small improvements, e.g. layout X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=b292109fe046167f05bf56c89e2ddd56bd2f33b6;p=reqt ReFind: small improvements, e.g. layout --- diff --git a/appl/refind/mainwindow.cpp b/appl/refind/mainwindow.cpp index a40959a..0e6b151 100644 --- a/appl/refind/mainwindow.cpp +++ b/appl/refind/mainwindow.cpp @@ -34,11 +34,11 @@ 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 & 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); diff --git a/appl/refind/mainwindow.ui b/appl/refind/mainwindow.ui index 5889024..4a6ef11 100644 --- a/appl/refind/mainwindow.ui +++ b/appl/refind/mainwindow.ui @@ -43,7 +43,7 @@ - + @@ -81,67 +81,6 @@ - - - - - - - 75 - 0 - - - - - 100 - 16777215 - - - - Dirs - - - true - - - - - - - - 75 - 0 - - - - - 100 - 16777215 - - - - Links - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -191,61 +130,6 @@ - - - - - - - 130 - 0 - - - - - 200 - 16777215 - - - - Regular expr. - - - - - - - - 150 - 0 - - - - - 200 - 16777215 - - - - Binary files - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -382,6 +266,122 @@ + + + + + + + 75 + 0 + + + + + 100 + 16777215 + + + + Dirs + + + true + + + + + + + + 75 + 0 + + + + + 100 + 16777215 + + + + Links + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 130 + 0 + + + + + 200 + 16777215 + + + + Regular expr. + + + + + + + + 150 + 0 + + + + + 200 + 16777215 + + + + Binary files + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/appl/refind/refind.pro b/appl/refind/refind.pro index 1555566..7c5b807 100644 --- a/appl/refind/refind.pro +++ b/appl/refind/refind.pro @@ -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 \ diff --git a/base/rebase.hpp b/base/rebase.hpp index 8c7577c..c4d6aa1 100644 --- a/base/rebase.hpp +++ b/base/rebase.hpp @@ -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 '\\' diff --git a/gui/ReGuiQueue.cpp b/gui/ReGuiQueue.cpp index ad3f486..8657ef3 100644 --- a/gui/ReGuiQueue.cpp +++ b/gui/ReGuiQueue.cpp @@ -13,7 +13,7 @@ * Constructor. */ ReGuiQueue::ReGuiQueue() : - QVector(), + QVector(), m_locker() { }