]> gitweb.hamatoma.de Git - reqt/commitdiff
rebackgui: windows specific errors, program icon
authorHamatoma <git.tortouse@hm.f-r-e-i.de>
Wed, 17 Feb 2016 19:50:06 +0000 (20:50 +0100)
committerHamatoma <git.tortouse@hm.f-r-e-i.de>
Wed, 17 Feb 2016 19:50:06 +0000 (20:50 +0100)
appl/rebackgui/BackupEngine.cpp
appl/rebackgui/mainwindow.cpp
appl/rebackgui/rebackgui.pro

index 55d5e50a2c507bc81a50a43c37957f3f0864ea20..f9fe13ae5ecf5d6ed2682f9b2b3d23581d98476b 100644 (file)
@@ -609,6 +609,14 @@ void SearchTask::run()
                  .arg(ReQStringUtils::readableDuration(
                                   QDateTime::currentMSecsSinceEpoch() - start)));
 }
+void checkInfo(const QString& info){
+    int ix = info.indexOf('\t') + 1;
+    if (ix > 0 && ix < info.length() && info.at(ix) > ' '){
+        QChar cc = info.at(ix);
+        ix++;
+    }
+}
+
 /**
  * Search the files to backup and write it to a list.
  *
@@ -673,7 +681,7 @@ void SearchTask::searchOneDirectory(const QString& source,
                   if (doTransfer){
                           info = prefix + it.fileName();
                   }
-                  m_mutex.lock();
+           m_mutex.lock();
                   if (doTransfer){
                           m_files.append(info);
                           m_hotFiles++;
@@ -764,6 +772,9 @@ bool SearchTargetTask::removeOlder(const QString& directory, const QDateTime& ti
                   isEmpty = false;
            info = QChar(MAX_INDEX) + ReFileUtils::nativePath(it.filePath()) + m_separatorString
                                   + QChar(CmdRemove);
+#if defined _DEBUG
+           checkInfo(info);
+#endif
                   m_mutex.lock();
                   m_files.append(info);
                   m_hotFiles++;
@@ -779,7 +790,10 @@ bool SearchTargetTask::removeOlder(const QString& directory, const QDateTime& ti
                        m_mainWindow->addToFileList("x " + directory);
                info = QChar(MAX_INDEX) + directory + m_separatorString
                                + QChar(CmdRemoveDir);
-               m_mutex.lock();
+#if defined _DEBUG
+           checkInfo(info);
+#endif
+        m_mutex.lock();
                m_files.append(info);
                m_matchedFiles++;
                m_hotFiles++;
@@ -839,7 +853,10 @@ void SearchTargetTask::searchOneDirectory(const QString& target,
                                   info = prefix + QChar(command) + it.fileName();
                           }
                   }
-                  m_mutex.lock();
+#if defined _DEBUG
+           checkInfo(info);
+#endif
+           m_mutex.lock();
                   if (command != CmdUndef){
                           m_files.append(info);
                           m_hotFiles++;
@@ -881,10 +898,12 @@ void SearchTargetTask::searchOneDirectory(const QString& target,
  */
 void SearchTargetTask::moveToShadow(const QString& target, const QString& relPath, int index){
        QString shadowDir = m_shadowDirs.at(index) + relPath;
-       if (! ReFileUtils::makeDirWithParents(shadowDir))
+    ReQStringUtils::chomp(shadowDir, OS_SEPARATOR);
+    if (! ReFileUtils::makeDirWithParents(shadowDir)){
+
                error(QObject::tr("cannot create shadow directory (%1): %2")
                          .arg(errno).arg(shadowDir));
-       else {
+    } else {
                QString shadow = shadowDir + ReFileUtils::nodeOf(target);
                if (rename(I18N::s2b(target).constData(), I18N::s2b(shadow).constData()) != 0){
                        error(QObject::tr("cannot move to shadow directory (%1): %2 -> %3")
index 886461037903c542ed5af10c4eb7714cbadf09dd..2ab04606bdde49cef17d0a913d0cded620412efb 100644 (file)
@@ -13,7 +13,7 @@
 #include "aboutdialog.hpp"
 #include <QFileDialog>
 
-const QString VERSION("2016.02.16");
+const QString VERSION("2016.02.17");
 
 /**
  * Constructor.
index 7a982b01b0ed499f0b063f141834ba66543b9f04..8051f80be17a830789c2985451ee954b7fbecf17 100644 (file)
@@ -12,7 +12,7 @@ TARGET = rebackgui
 TEMPLATE = app
 INCLUDEPATH = ../..
 
-win32:RC_ICONS += rebackgui.ico
+RC_ICONS = rebackgui.ico
 
 SOURCES += main.cpp\
         ../../base/ReException.cpp \