summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-14 20:07:36 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-14 20:07:36 (GMT)
commitd39f3980f5ba449a43d25d46a3c0eee81001856a (patch)
treebd58b28e5f9f088b5a2e8b755f8787aa78a292e3 /src
parentcfee61fd74d7fe73f0de13356fe683bc8ae91f92 (diff)
parent2d0bd1a13328d5a5ed6c4d1e768937a6627f1086 (diff)
downloadQt-d39f3980f5ba449a43d25d46a3c0eee81001856a.zip
Qt-d39f3980f5ba449a43d25d46a3c0eee81001856a.tar.gz
Qt-d39f3980f5ba449a43d25d46a3c0eee81001856a.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QFile::remove: don't fail for unrelated errors Fix tst_qmlgraphicstext::letterSpacing tst_qmlgraphicstext::wordSpacing Sent for review into 4.6. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 8f6992f4e8f027818429d428393b08068eca9ffa ) network internals: fix uploading of data File dialog mode is not correctly updated in Mac (Cocoa). add tests for QFlags behavior in QtScript
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfile.cpp1
-rw-r--r--src/gui/dialogs/qfiledialog.cpp15
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm7
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
5 files changed, 27 insertions, 8 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 6395cc7..4c7f3f0 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -643,6 +643,7 @@ QFile::remove()
qWarning("QFile::remove: Empty or null file name");
return false;
}
+ unsetError();
close();
if(error() == QFile::NoError) {
if(fileEngine()->remove()) {
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 3d59463..21650bb 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1222,12 +1222,6 @@ QFileDialog::ViewMode QFileDialog::viewMode() const
void QFileDialog::setFileMode(QFileDialog::FileMode mode)
{
Q_D(QFileDialog);
- if (d->nativeDialogInUse){
- d->model->setFilter(d->filterForMode(filter()));
- d->setFilter_sys();
- return;
- }
-
d->fileMode = mode;
d->retranslateWindowTitle();
@@ -1263,6 +1257,11 @@ void QFileDialog::setFileMode(QFileDialog::FileMode mode)
}
}
setLabelText(Accept, buttonText);
+ if (d->nativeDialogInUse){
+ d->setFilter_sys();
+ return;
+ }
+
d->qFileDialogUi->fileTypeCombo->setEnabled(!testOption(ShowDirsOnly));
d->_q_updateOkButton();
}
@@ -1300,6 +1299,10 @@ void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode)
d->qFileDialogUi->lookInCombo->setEditable(false);
}
d->retranslateWindowTitle();
+#if defined(Q_WS_MAC)
+ d->deleteNativeDialog_sys();
+ setAttribute(Qt::WA_DontShowOnScreen, false);
+#endif
}
/*
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index db5c356..67daced 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -639,9 +639,16 @@ void QFileDialogPrivate::setFilter_sys()
{
#ifndef QT_MAC_USE_COCOA
#else
+ Q_Q(QFileDialog);
QMacCocoaAutoReleasePool pool;
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
*(delegate->mQDirFilter) = model->filter();
+ delegate->mFileMode = fileMode;
+ [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(q->windowTitle())];
+ [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]];
+ if (fileNameLabelExplicitlySat)
+ [delegate->mSavePanel setNameFieldLabel:[delegate strip:qFileDialogUi->fileNameLabel->text()]];
+
[delegate updateProperties];
#endif
}
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 4c57dff..bbd35f1 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1614,7 +1614,11 @@ bool QFont::operator==(const QFont &f) const
&& f.d->overline == d->overline
&& f.d->strikeOut == d->strikeOut
&& f.d->kerning == d->kerning
- && f.d->capital == d->capital));
+ && f.d->capital == d->capital
+ && f.d->letterSpacingIsAbsolute == d->letterSpacingIsAbsolute
+ && f.d->letterSpacing == d->letterSpacing
+ && f.d->wordSpacing == d->wordSpacing
+ ));
}
@@ -1648,6 +1652,10 @@ bool QFont::operator<(const QFont &f) const
#endif // Q_WS_X11
if (f.d->capital != d->capital) return f.d->capital < d->capital;
+ if (f.d->letterSpacingIsAbsolute != d->letterSpacingIsAbsolute) return f.d->letterSpacingIsAbsolute < d->letterSpacingIsAbsolute;
+ if (f.d->letterSpacing != d->letterSpacing) return f.d->letterSpacing < d->letterSpacing;
+ if (f.d->wordSpacing != d->wordSpacing) return f.d->wordSpacing < d->wordSpacing;
+
int f1attrs = (f.d->underline << 3) + (f.d->overline << 2) + (f.d->strikeOut<<1) + f.d->kerning;
int f2attrs = (d->underline << 3) + (d->overline << 2) + (d->strikeOut<<1) + d->kerning;
return f1attrs < f2attrs;
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 39d09aa..1955dba 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -260,7 +260,7 @@ bool QHttpNetworkConnectionChannel::sendRequest()
// ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
// this is needed if the sends an reply before we have finished sending the request. In that
// case receiveReply had been called before but ignored the server reply
- QMetaObject::invokeMethod(connection, "_q_receiveReply", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
break;
}
case QHttpNetworkConnectionChannel::ReadingState: