summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-12-16 17:59:27 +0100
committerDavid Boddie <dboddie@trolltech.com>2009-12-16 17:59:27 +0100
commitf763f0089e0acb114524a6276c2ed7ff823d1d05 (patch)
treee1d825f0a5f5429b27d153861f91b33dc4e4a6fc
parent2a2dec6666f8f38e9240784b423ce69b18e1064e (diff)
parentcbe70d58bc1667b2e09f78a5d4427e7d071a2354 (diff)
downloadqt4-tools-f763f0089e0acb114524a6276c2ed7ff823d1d05.tar.gz
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp4
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h3
-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/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/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qevent.cpp4
-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
16 files changed, 52 insertions, 196 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 7dc456ee63..593a075ff7 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1394,8 +1394,10 @@ bool VCLinkerTool::parseOption(const char* option)
case 0x0005bb6: // X86
TargetMachine = machineX86;
break;
- // so we put the others in AdditionalOptions...
case 0x0005b94: // X64
+ TargetMachine = machineX64;
+ break;
+ // so we put the others in AdditionalOptions...
case 0x0046063: // AM33
case 0x000466d: // ARM
case 0x0004795: // CEE
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index d178d30304..f7fdf3a243 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -298,7 +298,8 @@ enum linkProgressOption {
};
enum machineTypeOption {
machineNotSet,
- machineX86
+ machineX86,
+ machineX64 = 17
};
enum midlCharOption {
midlCharUnsigned,
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 594718e922..47f340c2c9 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 2ef48b5154..f86bfd3612 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 93df45d480..8a55bad612 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 152a7759e0..097b8b4823 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 39e50c4c52..bf43f88d1c 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/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 22114c2abd..8645f17256 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 63e9e0f662..0123a6e759 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 c4ad67cb2f..1273d06358 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/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index ddd8ca611c..6c067460c2 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 3579c796eb..eedf0a7068 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -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/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index 594e488fe8..3f159f6af1 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 4437fef2a5..23ab817ba5 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 dc648e8ae8..f13dce284d 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 d59786165a..beeee7f714 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();
-}