diff options
-rw-r--r-- | dist/changes-4.7.2 | 28 | ||||
-rw-r--r-- | mkspecs/win32-g++/qmake.conf | 2 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_symbian.cpp | 52 |
3 files changed, 44 insertions, 38 deletions
diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2 index 03a5408..17a066f 100644 --- a/dist/changes-4.7.2 +++ b/dist/changes-4.7.2 @@ -39,8 +39,8 @@ Optimizations QtCore ------ - - foo - * bar + - QStateMachine + * [QTBUG-14491] Fix compilation on AIX 5.3 with gcc. QtGui ----- @@ -73,8 +73,23 @@ QtOpenGL QtScript -------- - - foo - * bar + - QScriptContext + * [QTBUG-17137] Fix crash when generating backtrace involving a + built-in (ECMA) function. + - QScriptEngine + * [QTBUG-16987] Ensure QScriptProgram objects are invalidated + when engine is destroyed. + * [QTBUG-16828] Fix alignment issue causing crashes on platforms + with only 4-byte-aligned malloc'ed memory (e.g. Symbian debug + builds). + * [QTBUG-15144] Fix GC-related crash in QScriptValue::setData(). + * [QTBUG-15079] Fix crash when QScriptClass property getter + returns an invalid value. + * [QTBUG-13440] Fix bug that caused Math.random() not to + produce random values. + - QScriptValue + * [QTBUG-14801] Fix crash in QScriptValue::construct() when + the function throws a non-Object value. QtSql ----- @@ -171,6 +186,11 @@ Qt for Symbian - QLineEdit * [QTBUG-16238] Fix one character displacement for cursor in line edits. + - QtScript + * [QTBUG-16685] Fix crash in JavaScript stack allocator. + * [QTBUG-15847] Add compiler optimizations. + * [QTBUG-14293] Enhanced JavaScript heap allocator. + - qmake & mkspecs * [QT-4193] Only add ICON for application projects in symbianpkgrules.pri * [QTBUG-13159] Allow pkg_prerules and pkg_postrules to be targeted to separate files. diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 2d9833b..65ae590 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -77,7 +77,7 @@ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain QMAKE_DIR_SEP = / QMAKE_QMAKE ~= s,\\\\,/, QMAKE_COPY = cp - QMAKE_COPY_DIR = xcopy /s /q /y /i + QMAKE_COPY_DIR = cp -r QMAKE_MOVE = mv QMAKE_DEL_FILE = rm QMAKE_MKDIR = mkdir diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index b8ea5e5..ed98950 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE +extern QStringList qt_make_filter_list(const QString &filter); // defined in qfiledialog.cpp +extern QStringList qt_clean_filter_list(const QString &filter); // defined in qfiledialog.cpp + enum DialogMode { DialogOpen, DialogSave, DialogFolder }; #if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3) class CExtensionFilter : public MAknFileFilter @@ -61,56 +64,39 @@ class CExtensionFilter : public MAknFileFilter public: void setFilter(const QString filter) { - filterList.clear(); - if (filter.left(2) == QLatin1String("*.")) { - //Filter has only extensions - filterList << filter.split(QLatin1String(" ")); - return; - } else { - //Extensions are in parenthesis and there may be several filters - QStringList separatedFilters(filter.split(QLatin1String(";;"))); - for (int i = 0; i < separatedFilters.size(); i++) { - if (separatedFilters.at(i).contains(QLatin1String("(*)"))) { - filterList << QLatin1String("(*)"); - return; - } - } - QRegExp rx(QLatin1String("\\(([^\\)]*)\\)")); - int pos = 0; - while ((pos = rx.indexIn(filter, pos)) != -1) { - filterList << rx.cap(1).split(QLatin1String(" ")); - pos += rx.matchedLength(); - } + QStringList unparsedFiltersList = qt_make_filter_list(filter); + QStringList filterList; + filterRxList.clear(); + + foreach (QString unparsedFilter, unparsedFiltersList) { + filterList << qt_clean_filter_list(unparsedFilter); + } + foreach (QString currentFilter, filterList) { + QRegExp filterRx(currentFilter, Qt::CaseInsensitive, QRegExp::Wildcard); + filterRxList << filterRx; } } TBool Accept(const TDesC &/*aDriveAndPath*/, const TEntry &aEntry) const { - if (aEntry.IsDir()) - return ETrue; - //If no filter for files, all can be accepted - if (filterList.isEmpty()) + if (filterRxList.isEmpty()) return ETrue; - if (filterList == QStringList(QLatin1String("(*)"))) + if (aEntry.IsDir()) return ETrue; - for (int i = 0; i < filterList.size(); ++i) { - QString extension = filterList.at(i); - //remove '*' from the beginning of the extension - if (extension.at(0) == QLatin1Char('*')) - extension = extension.mid(1); - + foreach (QRegExp rx, filterRxList) { QString fileName = qt_TDesC2QString(aEntry.iName); - if (fileName.endsWith(extension)) + if (rx.exactMatch(fileName)) return ETrue; } + return EFalse; } private: - QStringList filterList; + QList<QRegExp> filterRxList; }; #endif |