diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-20 21:20:08 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-20 21:20:08 (GMT) |
commit | b0c95377cadcaa3aa784ca909e13033c85233912 (patch) | |
tree | d4242025c55c7bffd4e259a420bc6c39c48efa58 /src | |
parent | c220a549d185989fc2b0f429ceb75dd6a84332f6 (diff) | |
parent | e17a5bc80b2662b71d1bc0c37a46d8602c6e707d (diff) | |
download | Qt-b0c95377cadcaa3aa784ca909e13033c85233912.zip Qt-b0c95377cadcaa3aa784ca909e13033c85233912.tar.gz Qt-b0c95377cadcaa3aa784ca909e13033c85233912.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
qmake vcxproj generator: fix usage of /Fd in QMAKE_CXXFLAGS
qmake: fix vcxproj generator when using /Fd in QMAKE_CXXFLAGS
Revised fix for pixmap loading
Assistant: Clean-up - fix spelling mistakes.
Assistant: Clean-up: Use const references in foreach loops.
Assistant: Clean-up: Mark constructors as explicit.
Assistant: Clean-up - add newlines to end of files.
Doc: Changes to the index page and second level pages linking to the index page.
Use Ctrl rather than Alt for switching tabs in the demo browser
Doc: fixing creator bugs, removing menus and textbox in the header
Update Japanese translations
Ukrainian translation updated
qtconfig and qvfb internationalization fixes
add full width characters to ending() in linguist
QFileDialog::HideNameFilterDetails breaks Cocoa QFileDIalog filter
qdoc: Changed id attribute to be a UUID.
just build connman and networkmanager plugins on linux
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 25 | ||||
-rw-r--r-- | src/gui/image/qpixmap.cpp | 5 | ||||
-rw-r--r-- | src/plugins/bearer/bearer.pro | 2 |
3 files changed, 23 insertions, 9 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 64fc0ee..87850a7 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -119,6 +119,7 @@ QT_USE_NAMESPACE - (QString)removeExtensions:(const QString &)filter; - (void)createTextField; - (void)createPopUpButton:(const QString &)selectedFilter hideDetails:(BOOL)hideDetails; +- (QStringList)findStrippedFilterWithVisualFilterName:(QString)name; - (void)createAccessory; @end @@ -127,8 +128,6 @@ QT_USE_NAMESPACE - (id)initWithAcceptMode:(QT_PREPEND_NAMESPACE(QFileDialog::AcceptMode))acceptMode title:(const QString &)title - nameFilters:(const QStringList &)nameFilters - selectedNameFilter:(const QString &)selectedNameFilter hideNameFilterDetails:(bool)hideNameFilterDetails qDirFilter:(QT_PREPEND_NAMESPACE(QDir::Filters))qDirFilter fileOptions:(QT_PREPEND_NAMESPACE(QFileDialog::Options))fileOptions @@ -158,8 +157,10 @@ QT_USE_NAMESPACE mPriv = priv; mLastFilterCheckPath = new QString; mQDirFilterEntryList = new QStringList; - mNameFilterDropDownList = new QStringList(nameFilters); - mSelectedNameFilter = new QStringList(qt_clean_filter_list(selectedNameFilter)); + mNameFilterDropDownList = new QStringList(priv->nameFilters); + QString selectedVisualNameFilter = priv->qFileDialogUi->fileTypeCombo->currentText(); + mSelectedNameFilter = new QStringList([self findStrippedFilterWithVisualFilterName:selectedVisualNameFilter]); + QFileInfo sel(selectFile); if (sel.isDir()){ mCurrentDir = [qt_mac_QStringToNSString(sel.absoluteFilePath()) retain]; @@ -168,8 +169,9 @@ QT_USE_NAMESPACE mCurrentDir = [qt_mac_QStringToNSString(sel.absolutePath()) retain]; mCurrentSelection = new QString(sel.absoluteFilePath()); } + [mSavePanel setTitle:qt_mac_QStringToNSString(title)]; - [self createPopUpButton:selectedNameFilter hideDetails:hideNameFilterDetails]; + [self createPopUpButton:selectedVisualNameFilter hideDetails:hideNameFilterDetails]; [self createTextField]; [self createAccessory]; [mSavePanel setAccessoryView:mNameFilterDropDownList->size() > 1 ? mAccessoryView : nil]; @@ -350,7 +352,7 @@ QT_USE_NAMESPACE // This mDelegate function is called when the _name_ filter changes. Q_UNUSED(sender); QString selection = mNameFilterDropDownList->value([mPopUpButton indexOfSelectedItem]); - *mSelectedNameFilter = QT_PREPEND_NAMESPACE(qt_clean_filter_list)(selection); + *mSelectedNameFilter = [self findStrippedFilterWithVisualFilterName:selection]; [mSavePanel validateVisibleColumns]; [self updateProperties]; if (mPriv) @@ -499,6 +501,15 @@ QT_USE_NAMESPACE } } +- (QStringList) findStrippedFilterWithVisualFilterName:(QString)name +{ + for (int i=0; i<mNameFilterDropDownList->size(); ++i) { + if (mNameFilterDropDownList->at(i).startsWith(name)) + return qt_clean_filter_list(mNameFilterDropDownList->at(i)); + } + return QStringList(); +} + - (void)createAccessory { NSRect accessoryRect = { { 0.0, 0.0 }, { 450.0, 33.0 } }; @@ -1039,8 +1050,6 @@ void QFileDialogPrivate::createNSOpenSavePanelDelegate() QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) alloc] initWithAcceptMode:acceptMode title:q->windowTitle() - nameFilters:q->nameFilters() - selectedNameFilter:q->selectedNameFilter() hideNameFilterDetails:q->testOption(QFileDialog::HideNameFilterDetails) qDirFilter:model->filter() fileOptions:opts diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 1c0ceff..c039ca8 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -836,6 +836,11 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers % HexString<quint64>(info.size()) % HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType); + // Note: If no extension is provided, we try to match the + // file against known plugin extensions + if (!info.completeSuffix().isEmpty() && !info.exists()) + return false; + if (QPixmapCache::find(key, *this)) return true; diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro index 6d8f7f2..bbe8ab1 100644 --- a/src/plugins/bearer/bearer.pro +++ b/src/plugins/bearer/bearer.pro @@ -5,7 +5,7 @@ contains(QT_CONFIG, dbus) { SUBDIRS += icd } else { SUBDIRS += generic - !mac:SUBDIRS += connman networkmanager + linux*:SUBDIRS += connman networkmanager } } |