summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp4
-rw-r--r--src/corelib/io/qtextstream.cpp9
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h3
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp10
-rw-r--r--src/corelib/kernel/qcoreapplication.h4
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h4
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp5
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h2
-rw-r--r--src/corelib/tools/qlocale.cpp51
-rw-r--r--src/corelib/tools/qlocale_p.h5
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp121
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm35
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qevent.cpp8
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib.cpp2
-rw-r--r--src/gui/text/qfontdatabase.cpp14
-rw-r--r--src/gui/widgets/qlineedit.h1
-rw-r--r--src/gui/widgets/qlineedit_p.cpp17
-rw-r--r--src/gui/widgets/qlineedit_p.h2
-rw-r--r--src/plugins/s60/src/qlocale_3_1.cpp8
20 files changed, 90 insertions, 217 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 1bdc3ed..88b7271 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -3407,9 +3407,9 @@ quint64 QWebPage::bytesReceived() const
/*!
\fn void QWebPage::unsupportedContent(QNetworkReply *reply)
- This signals is emitted when webkit cannot handle a link the user navigated to.
+ This signal is emitted when WebKit cannot handle a link the user navigated to.
- At signal emissions time the meta data of the QNetworkReply \a reply is available.
+ At signal emission time the meta-data of the QNetworkReply \a reply is available.
\note This signal is only emitted if the forwardUnsupportedContent property is set to true.
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 594718e..47f340c 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -440,7 +440,7 @@ QTextStreamPrivate::QTextStreamPrivate(QTextStream *q_ptr)
readConverterSavedState(0),
#endif
readConverterSavedStateOffset(0),
- locale(QLocale::C)
+ locale(QLocale::c())
{
this->q_ptr = q_ptr;
reset();
@@ -1806,8 +1806,7 @@ QTextStreamPrivate::NumberParsingStatus QTextStreamPrivate::getNumber(qulonglong
if (ch.isDigit()) {
val *= 10;
val += ch.digitValue();
- } else if (locale.language() != QLocale::C
- && ch == locale.groupSeparator()) {
+ } else if (locale != QLocale::c() && ch == locale.groupSeparator()) {
continue;
} else {
ungetChar(ch);
@@ -1958,7 +1957,7 @@ bool QTextStreamPrivate::getReal(double *f)
else if (lc == locale.negativeSign().toLower()
|| lc == locale.positiveSign().toLower())
input = InputSign;
- else if (locale.language() != QLocale::C // backward-compatibility
+ else if (locale != QLocale::c() // backward-compatibility
&& lc == locale.groupSeparator().toLower())
input = InputDigit; // well, it isn't a digit, but no one cares.
else
@@ -2283,7 +2282,7 @@ bool QTextStreamPrivate::putNumber(qulonglong number, bool negative)
// add thousands group separators. For backward compatibility we
// don't add a group separator for C locale.
- if (locale.language() != QLocale::C)
+ if (locale != QLocale::c())
flags |= QLocalePrivate::ThousandsGroup;
const QLocalePrivate *dd = locale.d();
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
index 2ef48b5..f86bfd3 100644
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ b/src/corelib/kernel/qcore_symbian_p.h
@@ -139,8 +139,7 @@ enum S60PluginFuncOrdinals
S60Plugin_GetLongDateFormatSpec = 3,
S60Plugin_GetShortDateFormatSpec = 4,
S60Plugin_LocalizedDirectoryName = 5,
- S60Plugin_GetSystemDrive = 6,
- S60Plugin_RefreshLocaleInfo = 7
+ S60Plugin_GetSystemDrive = 6
};
Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal);
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 93df45d..8a55bad 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -69,7 +69,6 @@
# include <f32file.h>
# include "qeventdispatcher_symbian_p.h"
# include "private/qcore_symbian_p.h"
-# include "private/qlocale_p.h"
#elif defined(Q_OS_UNIX)
# if !defined(QT_NO_GLIB)
# include "qeventdispatcher_glib_p.h"
@@ -2602,13 +2601,4 @@ int QCoreApplication::loopLevel()
\sa Q_OBJECT, QObject::tr(), QObject::trUtf8()
*/
-#if defined(Q_OS_SYMBIAN)
-void QCoreApplicationPrivate::_q_symbianRegisterLocaleNotifier()
-{
- QLocalePrivate::symbianRegisterLocaleNotifier();
-}
-#endif
-
QT_END_NAMESPACE
-
-#include "moc_qcoreapplication.cpp"
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 152a775..097b8b4 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -196,10 +196,6 @@ private:
static QCoreApplication *self;
-#if defined(Q_OS_SYMBIAN)
- Q_PRIVATE_SLOT(d_func(), void _q_symbianRegisterLocaleNotifier())
-#endif
-
Q_DISABLE_COPY(QCoreApplication)
friend class QEventDispatcherUNIXPrivate;
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 39e50c4..bf43f88 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -122,10 +122,6 @@ public:
static uint attribs;
static inline bool testAttribute(uint flag) { return attribs & (1 << flag); }
-
-#if defined(Q_OS_SYMBIAN)
- void _q_symbianRegisterLocaleNotifier();
-#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 665b73e..16871c3 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -341,6 +341,11 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
g_source_attach(&idleTimerSource->source, mainContext);
}
+void QEventDispatcherGlibPrivate::runTimersOnceWithNormalPriority()
+{
+ timerSource->runWithIdlePriority = false;
+}
+
QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent)
: QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate), parent)
{
diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h
index 6a4e726..57cbf94 100644
--- a/src/corelib/kernel/qeventdispatcher_glib_p.h
+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h
@@ -110,6 +110,8 @@ public:
GSocketNotifierSource *socketNotifierSource;
GTimerSource *timerSource;
GIdleTimerSource *idleTimerSource;
+
+ void runTimersOnceWithNormalPriority();
};
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 22114c2..8645f17 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -129,10 +129,6 @@ inline bool isascii(int c)
}
#endif
-#if defined(Q_OS_SYMBIAN)
-void symbianUpdateSystemPrivate();
-#endif
-
/******************************************************************************
** Helpers for accessing Qt locale database
*/
@@ -1191,14 +1187,14 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
}
case DateFormatLong:
case DateFormatShort:
- return macToQtFormat(getMacDateFormat(type == DateFormatShort
+ return getMacDateFormat(type == DateFormatShort
? kCFDateFormatterShortStyle
- : kCFDateFormatterLongStyle));
+ : kCFDateFormatterLongStyle);
case TimeFormatLong:
case TimeFormatShort:
- return macToQtFormat(getMacTimeFormat(type == TimeFormatShort
+ return getMacTimeFormat(type == TimeFormatShort
? kCFDateFormatterShortStyle
- : kCFDateFormatterLongStyle));
+ : kCFDateFormatterLongStyle);
case DayNameLong:
case DayNameShort:
return macDayName(in.toInt(), (type == DayNameShort));
@@ -1392,8 +1388,7 @@ QSystemLocale::QSystemLocale()
/*! \internal */
QSystemLocale::QSystemLocale(bool)
-{
-}
+{ }
/*!
Deletes the object.
@@ -1412,29 +1407,16 @@ static const QSystemLocale *systemLocale()
{
if (_systemLocale)
return _systemLocale;
-#if defined(Q_OS_SYMBIAN)
- symbianInitSystemLocale();
-#endif
return QSystemLocale_globalSystemLocale();
}
-void QLocalePrivate::updateSystemPrivate(bool initialize)
+void QLocalePrivate::updateSystemPrivate()
{
const QSystemLocale *sys_locale = systemLocale();
if (!system_lp)
system_lp = globalLocalePrivate();
*system_lp = *sys_locale->fallbackLocale().d();
- system_lp->m_language_id = 0;
-#if defined(Q_OS_SYMBIAN)
- RDebug::Print(_L("updateSystemPrivate"));
-#endif
- if (!initialize)
- return;
-
-#if defined(Q_OS_SYMBIAN)
- symbianUpdateSystemPrivate();
-#endif
QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());
if (!res.isNull())
system_lp->m_language_id = res.toInt();
@@ -1464,12 +1446,12 @@ void QLocalePrivate::updateSystemPrivate(bool initialize)
}
#endif
-static const QLocalePrivate *systemPrivate(bool initialize = true)
+static const QLocalePrivate *systemPrivate()
{
#ifndef QT_NO_SYSTEMLOCALE
// copy over the information from the fallback locale and modify
if (!system_lp || system_lp->m_language_id == 0)
- QLocalePrivate::updateSystemPrivate(initialize);
+ QLocalePrivate::updateSystemPrivate();
return system_lp;
#else
@@ -1477,10 +1459,10 @@ static const QLocalePrivate *systemPrivate(bool initialize = true)
#endif
}
-static const QLocalePrivate *defaultPrivate(bool initialize = true)
+static const QLocalePrivate *defaultPrivate()
{
if (!default_lp)
- default_lp = systemPrivate(initialize);
+ default_lp = systemPrivate();
return default_lp;
}
@@ -2187,7 +2169,7 @@ QLocale::QLocale()
: v(0)
{
p.numberOptions = default_number_options;
- p.index = localePrivateIndex(defaultPrivate(false));
+ p.index = localePrivateIndex(defaultPrivate());
}
/*!
@@ -2217,7 +2199,7 @@ QLocale::QLocale(Language language, Country country)
// If not found, should default to system
if (d->languageId() == QLocale::C && language != QLocale::C) {
p.numberOptions = default_number_options;
- p.index = localePrivateIndex(defaultPrivate(false));
+ p.index = localePrivateIndex(defaultPrivate());
} else {
p.numberOptions = 0;
p.index = localePrivateIndex(d);
@@ -2301,7 +2283,6 @@ void QLocale::setDefault(const QLocale &locale)
*/
QLocale::Language QLocale::language() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return Language(d()->languageId());
}
@@ -2312,7 +2293,6 @@ QLocale::Language QLocale::language() const
*/
QLocale::Country QLocale::country() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return Country(d()->countryId());
}
@@ -3041,7 +3021,6 @@ QDateTime QLocale::toDateTime(const QString &string, const QString &format) cons
*/
QChar QLocale::decimalPoint() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->decimal();
}
@@ -3052,7 +3031,6 @@ QChar QLocale::decimalPoint() const
*/
QChar QLocale::groupSeparator() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->group();
}
@@ -3063,7 +3041,6 @@ QChar QLocale::groupSeparator() const
*/
QChar QLocale::percent() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->percent();
}
@@ -3074,7 +3051,6 @@ QChar QLocale::percent() const
*/
QChar QLocale::zeroDigit() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->zero();
}
@@ -3085,7 +3061,6 @@ QChar QLocale::zeroDigit() const
*/
QChar QLocale::negativeSign() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->minus();
}
@@ -3096,7 +3071,6 @@ QChar QLocale::negativeSign() const
*/
QChar QLocale::positiveSign() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->plus();
}
@@ -3107,7 +3081,6 @@ QChar QLocale::positiveSign() const
*/
QChar QLocale::exponential() const
{
- systemPrivate(); // make sure inline data is initialized from the system.
return d()->exponential();
}
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 63e9e0f..0123a6e 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -132,10 +132,7 @@ public:
CharBuff *result) const;
inline char digitToCLocale(const QChar &c) const;
- static void updateSystemPrivate(bool initialize = true);
-#if defined(Q_OS_SYMBIAN)
- static void symbianRegisterLocaleNotifier();
-#endif
+ static void updateSystemPrivate();
enum NumberMode { IntegerMode, DoubleStandardMode, DoubleScientificMode };
bool validateChars(const QString &str, NumberMode numMode, QByteArray *buff, int decDigits = -1) const;
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index c4ad67c..1273d06 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -46,94 +46,10 @@
#include <QThread>
#include <e32std.h>
-#include <e32const.h>
-#include <e32base.h>
#include "private/qcore_symbian_p.h"
-#include "private/qcoreapplication_p.h"
-#include "qlocale_p.h"
-#include "qdebug.h"
-
-QT_BEGIN_NAMESPACE
-
-class CLocaleChangeNotifier : public CActive
-{
-public:
- static CLocaleChangeNotifier *NewL();
- ~CLocaleChangeNotifier();
-
-private:
- CLocaleChangeNotifier();
- void ConstructL();
- void RunL();
- void DoCancel();
-
-private:
- RChangeNotifier changeNotifier;
-};
-
-static CLocaleChangeNotifier *qt_changeNotifier = NULL;
-
-CLocaleChangeNotifier *CLocaleChangeNotifier::NewL()
-{
- CLocaleChangeNotifier *self = new (ELeave) CLocaleChangeNotifier();
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
- return self;
-}
-
-CLocaleChangeNotifier::CLocaleChangeNotifier()
- : CActive(CActive::EPriorityStandard)
-{
-}
-CLocaleChangeNotifier::~CLocaleChangeNotifier()
-{
- Cancel();
- changeNotifier.Close();
-}
-
-void CLocaleChangeNotifier::ConstructL()
-{
- changeNotifier.Create();
- CActiveScheduler::Add(this);
- SetActive();
-}
-
-void CLocaleChangeNotifier::DoCancel()
-{
- changeNotifier.LogonCancel();
-}
-
-void CLocaleChangeNotifier::RunL()
-{
- SetActive();
- if (changeNotifier.Logon(iStatus) == KErrNone) {
- if (iStatus.Int() == EChangesLocale) {
- RDebug::Print(_L("notifier:locale changed"));
- QT_TRYCATCH_LEAVING(QLocalePrivate::updateSystemPrivate());
- } else {
- RDebug::Print(_L("notifier:something else changed"));
- }
- } else {
- RDebug::Print(_L("notifier:logon failed"));
- }
-}
-
-static void qt_cleanupLocaleNotifier()
-{
- delete qt_changeNotifier;
- qt_changeNotifier = NULL;
-}
-
-void QLocalePrivate::symbianRegisterLocaleNotifier()
-{
- if (!qt_changeNotifier) {
- QT_TRAP_THROWING(qt_changeNotifier = CLocaleChangeNotifier::NewL());
- qAddPostRoutine(qt_cleanupLocaleNotifier);
- }
-}
+QT_BEGIN_NAMESPACE
// Located in qlocale.cpp
extern void getLangAndCountry(const QString &name, QLocale::Language &lang, QLocale::Country &cntry);
@@ -149,7 +65,6 @@ static FormatFunc ptrTimeFormatL = NULL;
static FormatSpecFunc ptrGetTimeFormatSpec = NULL;
static FormatSpecFunc ptrGetLongDateFormatSpec = NULL;
static FormatSpecFunc ptrGetShortDateFormatSpec = NULL;
-static FormatSpecFunc ptrRefreshLocaleInfo = NULL;
// Default functions if functions cannot be resolved
static void defaultTimeFormatL(TTime&, TDes& des, const TDesC&, const TLocale&)
@@ -299,8 +214,6 @@ static const char *jp_locale_dep[] = {
*/
static QString s60ToQtFormat(const QString &sys_fmt)
{
- RDebug::Print(_L("Time Format \"%S\""), &timeFormat);
-
TLocale *locale = _s60Locale.GetLocale();
QString result;
@@ -766,8 +679,6 @@ static QString symbianDateFormat(bool short_format)
dateFormat.Set(ptrGetLongDateFormatSpec(_s60Locale));
}
- RDebug::Print(_L("symDateFormat: \"%S\""), &dateFormat);
-
return s60ToQtFormat(qt_TDesC2QString(dateFormat));
}
@@ -777,8 +688,6 @@ static QString symbianDateFormat(bool short_format)
*/
static QString symbianTimeFormat()
{
- TPtrC timeFormat = ptrGetTimeFormatSpec(_s60Locale);
- RDebug::Print(_L("symTimeFormat: \"%S\""), &timeFormat);
return s60ToQtFormat(qt_TDesC2QString(ptrGetTimeFormatSpec(_s60Locale)));
}
@@ -862,35 +771,22 @@ static QLocale::MeasurementSystem symbianMeasurementSystem()
return QLocale::MetricSystem;
}
-void symbianUpdateSystemPrivate()
+QLocale QSystemLocale::fallbackLocale() const
{
- RDebug::Print(_L("symbianUpdateSystemPrivate"));
// load system data before query calls
- _s60Locale.LoadSystemSettings();
- if (ptrRefreshLocaleInfo)
- ptrRefreshLocaleInfo();
-}
-
-void symbianInitSystemLocale()
-{
- RDebug::Print(_L("symbianInitSystemLocale"));
static QBasicAtomicInt initDone = Q_BASIC_ATOMIC_INITIALIZER(0);
if (initDone.testAndSetRelaxed(0, 1)) {
- if (!qt_changeNotifier) {
- QMetaObject::invokeMethod(qApp, SLOT(_q_symbianRegisterLocaleNotifier()), Qt::AutoConnection);
- }
+ _s60Locale.LoadSystemSettings();
// Initialize platform version dependent function pointers
ptrTimeFormatL = reinterpret_cast<FormatFunc>
- (qt_resolveS60PluginFunc(S60Plugin_TimeFormatL));
+ (qt_resolveS60PluginFunc(S60Plugin_TimeFormatL));
ptrGetTimeFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetTimeFormatSpec));
+ (qt_resolveS60PluginFunc(S60Plugin_GetTimeFormatSpec));
ptrGetLongDateFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetLongDateFormatSpec));
+ (qt_resolveS60PluginFunc(S60Plugin_GetLongDateFormatSpec));
ptrGetShortDateFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetShortDateFormatSpec));
- ptrRefreshLocaleInfo = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_RefreshLocaleInfo));
+ (qt_resolveS60PluginFunc(S60Plugin_GetShortDateFormatSpec));
if (!ptrTimeFormatL)
ptrTimeFormatL = &defaultTimeFormatL;
if (!ptrGetTimeFormatSpec)
@@ -905,10 +801,7 @@ void symbianInitSystemLocale()
}
while(initDone != 2)
QThread::yieldCurrentThread();
-}
-QLocale QSystemLocale::fallbackLocale() const
-{
TLanguage lang = User::Language();
QString locale = QLatin1String(qt_symbianLocaleName(lang));
return QLocale(locale);
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 53d2e1e..5753954 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -79,6 +79,7 @@ QT_USE_NAMESPACE
BOOL mHackedPanel;
NSInteger mResultCode;
BOOL mDialogIsExecuting;
+ BOOL mResultSet;
}
- (id)initWithColorPanel:(NSColorPanel *)panel
stolenContentView:(NSView *)stolenContentView
@@ -116,6 +117,7 @@ QT_USE_NAMESPACE
mHackedPanel = (okButton != 0);
mResultCode = NSCancelButton;
mDialogIsExecuting = false;
+ mResultSet = false;
if (mHackedPanel) {
[self relayout];
@@ -159,11 +161,13 @@ QT_USE_NAMESPACE
- (BOOL)windowShouldClose:(id)window
{
Q_UNUSED(window);
- if (mHackedPanel) {
- [self onCancelClicked];
- } else {
+ if (!mHackedPanel)
[self updateQtColor];
+ if (mDialogIsExecuting) {
[self finishOffWithCode:NSCancelButton];
+ } else {
+ mResultSet = true;
+ mPriv->colorDialog()->reject();
}
return true;
}
@@ -240,11 +244,12 @@ QT_USE_NAMESPACE
- (void)onCancelClicked
{
- Q_ASSERT(mHackedPanel);
- [[mStolenContentView window] close];
- delete mQtColor;
- mQtColor = new QColor();
- [self finishOffWithCode:NSCancelButton];
+ if (mHackedPanel) {
+ [[mStolenContentView window] close];
+ delete mQtColor;
+ mQtColor = new QColor();
+ [self finishOffWithCode:NSCancelButton];
+ }
}
- (void)updateQtColor
@@ -306,10 +311,16 @@ QT_USE_NAMESPACE
} else {
// Since we are not in a modal event loop, we can safely close
// down QColorDialog
- if (mResultCode == NSCancelButton)
- mPriv->colorDialog()->reject();
- else
- mPriv->colorDialog()->accept();
+ // Calling accept() or reject() can in turn call closeCocoaColorPanel.
+ // This check will prevent any such recursion.
+ if (!mResultSet) {
+ mResultSet = true;
+ if (mResultCode == NSCancelButton) {
+ mPriv->colorDialog()->reject();
+ } else {
+ mPriv->colorDialog()->accept();
+ }
+ }
}
}
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index ddd8ca6..6c06746 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -777,7 +777,7 @@ extern "C" {
NSPoint windowPoint = [theEvent locationInWindow];
NSPoint globalPoint = [[theEvent window] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
- QPoint qlocal = QPoint(localPoint.x, flipYCoordinate(localPoint.y));
+ QPoint qlocal = QPoint(localPoint.x, localPoint.y);
QPoint qglobal = QPoint(globalPoint.x, flipYCoordinate(globalPoint.y));
Qt::MouseButtons buttons = QApplication::mouseButtons();
bool wheelOK = false;
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index c4a25e1..eedf0a7 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -409,7 +409,7 @@ QMouseEventEx::~QMouseEventEx()
consider a top-level window A containing a child B which in turn contains a
child C (all with mouse tracking enabled):
- \image hoverEvents.png
+ \image hoverevents.png
Now, if you move the cursor from the top to the bottom in the middle of A,
you will get the following QEvent::MouseMove events:
@@ -432,7 +432,7 @@ QMouseEventEx::~QMouseEventEx()
\o A::HoverMove, B::HoverMove
\o A::HoverMove, B::HoverMove, C::HoverMove
\endlist
-
+
*/
/*!
@@ -3023,7 +3023,7 @@ QShowEvent::~QShowEvent()
This event is only used to notify the application of a request.
It may be safely ignored.
- \note This class is currently supported for Mac Os X only.
+ \note This class is currently supported for Mac OS X only.
*/
/*!
@@ -3066,6 +3066,8 @@ QFileOpenEvent::~QFileOpenEvent()
\fn QUrl QFileOpenEvent::url() const
Returns the url that is being opened.
+
+ \since 4.6
*/
QUrl QFileOpenEvent::url() const
{
diff --git a/src/gui/kernel/qguieventdispatcher_glib.cpp b/src/gui/kernel/qguieventdispatcher_glib.cpp
index f8a638c..a252499 100644
--- a/src/gui/kernel/qguieventdispatcher_glib.cpp
+++ b/src/gui/kernel/qguieventdispatcher_glib.cpp
@@ -152,6 +152,8 @@ static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointe
out:
+ source->d->runTimersOnceWithNormalPriority();
+
if (callback)
callback(user_data);
return true;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 7e93aa0..e9c7b89 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1482,13 +1482,13 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo)
and style will look attractive.
If the font family is available from two or more foundries the
- foundry name is included in the family name, e.g. "Helvetica
- [Adobe]" and "Helvetica [Cronyx]". When you specify a family you
- can either use the old hyphenated Qt 2.x "foundry-family" format,
- e.g. "Cronyx-Helvetica", or the new bracketed Qt 3.x "family
- [foundry]" format e.g. "Helvetica [Cronyx]". If the family has a
- foundry it is always returned, e.g. by families(), using the
- bracketed format.
+ foundry name is included in the family name; for example:
+ "Helvetica [Adobe]" and "Helvetica [Cronyx]". When you specify a
+ family, you can either use the old hyphenated "foundry-family"
+ format or the bracketed "family [foundry]" format; for example:
+ "Cronyx-Helvetica" or "Helvetica [Cronyx]". If the family has a
+ foundry it is always returned using the bracketed format, as is
+ the case with the value returned by families().
The font() function returns a QFont given a family, style and
point size.
diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index 594e488..3f159f6 100644
--- a/src/gui/widgets/qlineedit.h
+++ b/src/gui/widgets/qlineedit.h
@@ -288,6 +288,7 @@ private:
#ifdef QT_KEYPAD_NAVIGATION
Q_PRIVATE_SLOT(d_func(), void _q_editFocusChange(bool))
#endif
+ Q_PRIVATE_SLOT(d_func(), void _q_selectionChanged())
};
#endif // QT_NO_LINEEDIT
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 4437fef..23ab817 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -126,6 +126,21 @@ void QLineEditPrivate::_q_editFocusChange(bool e)
}
#endif
+void QLineEditPrivate::_q_selectionChanged()
+{
+ Q_Q(QLineEdit);
+ if (control->preeditAreaText().isEmpty()) {
+ QStyleOptionFrameV2 opt;
+ q->initStyleOption(&opt);
+ bool showCursor = control->hasSelectedText() ?
+ q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q):
+ true;
+ setCursorVisible(showCursor);
+ }
+
+ emit q->selectionChanged();
+}
+
void QLineEditPrivate::init(const QString& txt)
{
Q_Q(QLineEdit);
@@ -138,7 +153,7 @@ void QLineEditPrivate::init(const QString& txt)
QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)),
q, SLOT(_q_cursorPositionChanged(int,int)));
QObject::connect(control, SIGNAL(selectionChanged()),
- q, SIGNAL(selectionChanged()));
+ q, SLOT(_q_selectionChanged()));
QObject::connect(control, SIGNAL(accepted()),
q, SIGNAL(returnPressed()));
QObject::connect(control, SIGNAL(editingFinished()),
diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h
index dc648e8..f13dce2 100644
--- a/src/gui/widgets/qlineedit_p.h
+++ b/src/gui/widgets/qlineedit_p.h
@@ -128,7 +128,7 @@ public:
#ifdef QT_KEYPAD_NAVIGATION
void _q_editFocusChange(bool);
#endif
-
+ void _q_selectionChanged();
#ifndef QT_NO_COMPLETER
void _q_completionHighlighted(QString);
#endif
diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp
index d597861..beeee7f 100644
--- a/src/plugins/s60/src/qlocale_3_1.cpp
+++ b/src/plugins/s60/src/qlocale_3_1.cpp
@@ -50,7 +50,6 @@ _LIT(KLocaleIndependent, "%F");
static TBuf<10> dateFormat;
static TBuf<10> timeFormat;
-#define _DEBUG
static void initialiseDateFormat()
{
if(dateFormat.Length())
@@ -147,10 +146,3 @@ EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale&)
initialiseDateFormat();
return TPtrC(dateFormat);
}
-
-EXPORT_C void refreshLocaleInfo()
-{
- // clear the buffers, so next time we re-read data from the system.
- dateFormat.Zero();
- timeFormat.Zero();
-}