[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kexi] src: CSV import: make entering the filename (without selecting) work
From:       Jaroslaw Staniek <staniek () kde ! org>
Date:       2016-02-29 23:12:22
Message-ID: E1aaWzG-0000sv-Po () scm ! kde ! org
[Download RAW message or body]

Git commit 811fb1b2b9f53459ba615218e6f88ae965c27e53 by Jaroslaw Staniek.
Committed on 29/02/2016 at 23:07.
Pushed by staniek into branch 'master'.

CSV import: make entering the filename (without selecting) work

(from calligra.git)

M  +5    -0    src/plugins/importexport/csv/kexicsvimportdialog.cpp
M  +2    -0    src/widget/KexiFileWidget.h

http://commits.kde.org/kexi/811fb1b2b9f53459ba615218e6f88ae965c27e53

diff --git a/src/plugins/importexport/csv/kexicsvimportdialog.cpp \
b/src/plugins/importexport/csv/kexicsvimportdialog.cpp index afa1d90..4384dd7 100644
--- a/src/plugins/importexport/csv/kexicsvimportdialog.cpp
+++ b/src/plugins/importexport/csv/kexicsvimportdialog.cpp
@@ -396,6 +396,11 @@ void KexiCSVImportDialog::next()
 
     if (curPage == m_openFilePage) {
         m_fname = m_openFileWidget->highlightedFile();
+        if (m_openFileWidget->checkSelectedFile()) {
+            m_fname = m_openFileWidget->highlightedFile();
+        } else {
+            return;
+        }
         if (m_fname.isEmpty()) {
             KMessageBox::sorry(this, xi18nc("@info", "Select source filename."));
             return;
diff --git a/src/widget/KexiFileWidget.h b/src/widget/KexiFileWidget.h
index 3b25895..7250ee5 100644
--- a/src/widget/KexiFileWidget.h
+++ b/src/widget/KexiFileWidget.h
@@ -73,6 +73,8 @@ public:
     //! Excludes filters list
     void setExcludedFilters(const QSet<QString>& mimeTypes);
 
+    //! @return selected file.
+    //! @note Call checkSelectedFile() first
     virtual QString highlightedFile() const;
 
     //! just sets locationWidget()->setCurrentText(fn)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic