diff options
author | Bill King <bill.king@nokia.com> | 2009-08-05 03:45:19 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-08-05 03:45:19 (GMT) |
commit | bd51c3010e78925a2074122b281de53f01be9ef9 (patch) | |
tree | 23ac1bb378caebd0072b54fd191932ac65ac1b35 /src/gui/styles | |
parent | a4ede01350b506c9908241f0b9002f560cc0949f (diff) | |
parent | 7e8e53cded4622ac35ff115e26e074de6722d1a0 (diff) | |
download | Qt-bd51c3010e78925a2074122b281de53f01be9ef9.zip Qt-bd51c3010e78925a2074122b281de53f01be9ef9.tar.gz Qt-bd51c3010e78925a2074122b281de53f01be9ef9.tar.bz2 |
Merge branch '4.5'
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/gtksymbols.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index c2c7876..f947ac1 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -752,7 +752,24 @@ static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent, QGtk::gtk_file_filter_set_name(gtkFilter, qPrintable(name.isEmpty() ? extensions.join(QLS(", ")) : name)); foreach (const QString &fileExtension, extensions) { - QGtk::gtk_file_filter_add_pattern (gtkFilter, qPrintable(fileExtension)); + // Note Gtk file dialogs are by default case sensitive + // and only supports basic glob syntax so we + // rewrite .xyz to .[xX][yY][zZ] + QString caseInsensitive; + for (int i = 0 ; i < fileExtension.length() ; ++i) { + QChar ch = fileExtension.at(i); + if (ch.isLetter()) { + caseInsensitive.append( + QLatin1Char('[') + + ch.toLower() + + ch.toUpper() + + QLatin1Char(']')); + } else { + caseInsensitive.append(ch); + } + } + QGtk::gtk_file_filter_add_pattern (gtkFilter, qPrintable(caseInsensitive)); + } if (filterMap) filterMap->insert(gtkFilter, rawfilter); |