summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-02-23 12:45:18 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-02-23 12:45:18 (GMT)
commit341c49c91d48dca14902863d4c2303829b3d67f9 (patch)
treef08a2ada0f1f7cd6ccab28a0b356f17f2530c6a3
parent28e3d3516ebe88f7353fde44194aba5b7d1d8710 (diff)
parent57f716aab87ad517ccd6a36bdd5ca8178c561572 (diff)
downloadQt-341c49c91d48dca14902863d4c2303829b3d67f9.zip
Qt-341c49c91d48dca14902863d4c2303829b3d67f9.tar.gz
Qt-341c49c91d48dca14902863d4c2303829b3d67f9.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm10
-rw-r--r--tests/auto/qscriptstring/tst_qscriptstring.cpp6
2 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index bdcb872..8af0d2b 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -96,6 +96,7 @@ QT_USE_NAMESPACE
- (void)finishOffWithCode:(NSInteger)result;
- (void)showColorPanel;
- (void)exec;
+- (void)setResultSet:(BOOL)result;
@end
@implementation QCocoaColorPanelDelegate
@@ -158,6 +159,11 @@ QT_USE_NAMESPACE
[super dealloc];
}
+- (void)setResultSet:(BOOL)result
+{
+ mResultSet = result;
+}
+
- (BOOL)windowShouldClose:(id)window
{
Q_UNUSED(window);
@@ -320,7 +326,7 @@ QT_USE_NAMESPACE
} else {
mPriv->colorDialog()->accept();
}
- }
+ }
}
}
@@ -433,7 +439,7 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
priv:this];
[colorPanel setDelegate:static_cast<QCocoaColorPanelDelegate *>(delegate)];
}
-
+ [delegate setResultSet:false];
setCocoaPanelColor(initial);
[static_cast<QCocoaColorPanelDelegate *>(delegate) showColorPanel];
}
diff --git a/tests/auto/qscriptstring/tst_qscriptstring.cpp b/tests/auto/qscriptstring/tst_qscriptstring.cpp
index 808b643..ea4a92b 100644
--- a/tests/auto/qscriptstring/tst_qscriptstring.cpp
+++ b/tests/auto/qscriptstring/tst_qscriptstring.cpp
@@ -177,6 +177,12 @@ void tst_QScriptString::toArrayIndex_data()
QTest::newRow("101a") << QString::fromLatin1("101a") << false << quint32(0xffffffff);
QTest::newRow("4294967294") << QString::fromLatin1("4294967294") << true << quint32(0xfffffffe);
QTest::newRow("4294967295") << QString::fromLatin1("4294967295") << false << quint32(0xffffffff);
+ QTest::newRow("0.0") << QString::fromLatin1("0.0") << false << quint32(0xffffffff);
+ QTest::newRow("1.0") << QString::fromLatin1("1.0") << false << quint32(0xffffffff);
+ QTest::newRow("1.5") << QString::fromLatin1("1.5") << false << quint32(0xffffffff);
+ QTest::newRow("1.") << QString::fromLatin1("1.") << false << quint32(0xffffffff);
+ QTest::newRow(".1") << QString::fromLatin1(".1") << false << quint32(0xffffffff);
+ QTest::newRow("1e0") << QString::fromLatin1("1e0") << false << quint32(0xffffffff);
}
void tst_QScriptString::toArrayIndex()