diff src/folderselectdialog.cpp @ 100:7c84242971cb

Don't warn if folders do not match pattern
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 18 Nov 2016 11:36:14 +0100
parents 0cf81afa82c1
children 8ed21aa68021
line wrap: on
line diff
--- a/src/folderselectdialog.cpp	Fri Nov 18 11:35:50 2016 +0100
+++ b/src/folderselectdialog.cpp	Fri Nov 18 11:36:14 2016 +0100
@@ -207,14 +207,13 @@
     mModel->setHorizontalHeaderLabels(columns);
     QDir dir(folder);
     qDebug() << "Folder set to: " << folder;
-    QStringList errors;
     foreach (const QString & subfolder, dir.entryList(QDir::Dirs |
                                                       QDir::Readable |
                                                       QDir::NoDotAndDotDot)) {
         qDebug() << "Looking at: " << subfolder;
         QStringList itemData = subfolder.split(PATTERN_SEPERATOR);
         if (itemData.size() != columns.size()) {
-            errors << subfolder;
+            qDebug() << "Folder does not match pattern: " << subfolder;
             continue;
         }
         QList<QStandardItem*> items;
@@ -226,11 +225,6 @@
         mModel->appendRow(items);
     }
     mSortModel->setSourceModel(mModel);
-    if (!errors.isEmpty()) {
-        QString errMsg = tr("The following folders did not match the pattern: %1").arg(mFolderPattern);
-        errMsg += "\n" + errors.join("\n");
-        QMessageBox::warning(this, tr("Failed to parse some folders."), errMsg);
-    }
     mView->resizeColumnsToContents();
 }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)