summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-06-07 15:58:06 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-06-07 15:58:06 (GMT)
commit06ef7df062507f301fe7e07852a31087ff028f5b (patch)
treebbefbae2ad27cea63c7fbfd5f8d6c3d61c41fb00
parent1c79d97f8130a0c00f4c57535d85bdb4246eeb4d (diff)
parentbf966d125d5c5fa7719ae9f9110db8742d5a4c85 (diff)
downloadQt-06ef7df062507f301fe7e07852a31087ff028f5b.zip
Qt-06ef7df062507f301fe7e07852a31087ff028f5b.tar.gz
Qt-06ef7df062507f301fe7e07852a31087ff028f5b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r--.gitignore2
-rw-r--r--demos/qmediaplayer/qmediaplayer.pro2
-rw-r--r--mkspecs/features/symbian/def_files.prf2
-rw-r--r--mkspecs/features/symbian/symbian_building.prf3
-rw-r--r--mkspecs/linux-icc/qmake.conf23
-rw-r--r--qmake/generators/symbian/symbian_makefile.h2
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp36
-rw-r--r--qmake/generators/symbian/symbiancommon.h2
-rw-r--r--qmake/generators/symbian/symmake.cpp35
-rw-r--r--qmake/generators/symbian/symmake.h2
-rw-r--r--src/corelib/global/qendian.h26
-rw-r--r--src/gui/image/qpixmap.cpp3
-rw-r--r--src/gui/image/qpixmap_x11.cpp6
-rw-r--r--src/gui/styles/qcommonstyle.cpp4
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
-rw-r--r--src/gui/text/qtextoption.cpp10
-rw-r--r--src/gui/text/qtextoption.h2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm25
-rw-r--r--src/plugins/s60/s60pluginbase.pri17
-rw-r--r--tests/auto/qtextformat/tst_qtextformat.cpp5
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp9
-rw-r--r--tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp9
-rw-r--r--tests/auto/xmlpatternsxqts/tst_suitetest.cpp4
-rwxr-xr-xtranslations/check-ts.pl85
-rw-r--r--translations/check-ts.xq3
-rw-r--r--translations/qt_ja.ts (renamed from translations/qt_ja_JP.ts)0
-rw-r--r--translations/translations.pri7
27 files changed, 229 insertions, 98 deletions
diff --git a/.gitignore b/.gitignore
index f398365..f187b23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -206,7 +206,7 @@ bld.inf
*.loc
!s60main.rss
*.pkg
-plugin_commonU.def
+plugin_commonu.def
*.qtplugin
*.sis
*.sisx
diff --git a/demos/qmediaplayer/qmediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro
index cfe3905..9407a81 100644
--- a/demos/qmediaplayer/qmediaplayer.pro
+++ b/demos/qmediaplayer/qmediaplayer.pro
@@ -17,7 +17,7 @@ HEADERS += mediaplayer.h
target.path = $$[QT_INSTALL_DEMOS]/qmediaplayer
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.html *.doc images
-sources.path = $$[QT_INSTALL_DEMOS]/qmediaplayer qmediaplayer.pro
+sources.path = $$[QT_INSTALL_DEMOS]/qmediaplayer
INSTALLS += target sources
wince*{
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index eb17402..6a95763 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -41,7 +41,7 @@ symbian-abld|symbian-sbsv2 {
}
}
-} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib):!contains(CONFIG, plugin) {
!isEmpty(DEF_FILE) {
defFile = $$DEF_FILE
} else {
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index c230272..92988aa 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -96,6 +96,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
QMAKE_POST_LINK = && $$QMAKE_POST_LINK
}
+
+ contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def
+
# The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error.
# The comparison of dso files is to avoid extra building of modules that depend on this dso, in
# case it has not changed.
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 3353180..3b26f7d 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -21,13 +21,13 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -wd654,1572
+QMAKE_CFLAGS =
QMAKE_CFLAGS_DEPS = -M
-QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
-QMAKE_CFLAGS_DEBUG = -g
-QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing
+QMAKE_CFLAGS_DEBUG = -O0 -g
+QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -D_REENTRANT
@@ -58,11 +58,12 @@ QMAKE_LINK_SHLIB = icpc
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
-QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_SHLIB = -shared -shared-intel
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname,
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD =
-QMAKE_LFLAGS_RPATH = -Qoption,ld,-rpath,
+QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs
+QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
@@ -76,7 +77,7 @@ QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
-QMAKE_AR = ar cqs
+QMAKE_AR = xiar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB =
@@ -99,8 +100,8 @@ QMAKE_CXXFLAGS_USE_PRECOMPILE = -pch-use ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PC
QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_TEMP_OBJECT} ${QMAKE_PCH_TEMP_SOURCE}
# -Bsymbolic-functions (ld) support
-QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Qoption,ld,-Bsymbolic-functions
-QMAKE_LFLAGS_DYNAMIC_LIST = -Qoption,ld,--dynamic-list,
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
# Symbol visibility control
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h
index 061866a..94f0145 100644
--- a/qmake/generators/symbian/symbian_makefile.h
+++ b/qmake/generators/symbian/symbian_makefile.h
@@ -94,6 +94,8 @@ public:
}
}
+ writeCustomDefFile();
+
return T::writeMakefile(t);
}
};
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index aa44afc..f8b3aa5 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -58,6 +58,8 @@
#define RSS_TAG_FOOTER "footer"
#define RSS_TAG_DEFAULT "default_rules" // Same as just giving rules without tag
+#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
+
#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
#define DEFAULT_MANUFACTURER_NOTE \
"The package is not supported for devices from this manufacturer. Please try the selfsigned " \
@@ -775,6 +777,40 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
}
}
+void SymbianCommonGenerator::writeCustomDefFile()
+{
+ if (targetType == TypePlugin && !generator->project->isActiveConfig("stdbinary")) {
+ // Create custom def file for plugin
+ QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
+
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t(&ft);
+
+ t << "; ==============================================================================" << endl;
+ t << "; Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
+ t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
+ t << "; This file is generated by qmake and should not be modified by the" << endl;
+ t << "; user." << endl;
+ t << "; Name : " PLUGIN_COMMON_DEF_FILE_ACTUAL << endl;
+ t << "; Part of : " << generator->project->values("TARGET").join(" ") << endl;
+ t << "; Description : Fixes common plugin symbols to known ordinals" << endl;
+ t << "; Version : " << endl;
+ t << ";" << endl;
+ t << "; ==============================================================================" << "\n" << endl;
+
+ t << endl;
+
+ t << "EXPORTS" << endl;
+ t << "\tqt_plugin_query_verification_data @ 1 NONAME" << endl;
+ t << "\tqt_plugin_instance @ 2 NONAME" << endl;
+ t << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(QString(PLUGIN_COMMON_DEF_FILE_ACTUAL))
+ }
+ }
+}
+
QStringList SymbianCommonGenerator::symbianLangCodesFromTsFiles()
{
QStringList tsfiles;
diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h
index 3efe5a4..dae1e4a 100644
--- a/qmake/generators/symbian/symbiancommon.h
+++ b/qmake/generators/symbian/symbiancommon.h
@@ -81,6 +81,8 @@ protected:
QString &iconFile,
QMap<QString, QStringList> &userRssRules);
+ void writeCustomDefFile();
+
QStringList symbianLangCodesFromTsFiles();
void fillQt2S60LangMapTable();
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 1006e39..6082aeb 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -55,7 +55,6 @@
#define RESOURCE_DIRECTORY_MMP "/resource/apps"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
#define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def"
-#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
#define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1)
#define BLD_INF_RULES_BASE "BLD_INF_RULES."
@@ -264,40 +263,6 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::writeCustomDefFile()
-{
- if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
- // Create custom def file for plugin
- QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
-
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t(&ft);
-
- t << "; ==============================================================================" << endl;
- t << "; Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
- t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
- t << "; This file is generated by qmake and should not be modified by the" << endl;
- t << "; user." << endl;
- t << "; Name : " PLUGIN_COMMON_DEF_FILE_ACTUAL << endl;
- t << "; Part of : " << project->values("TARGET").join(" ") << endl;
- t << "; Description : Fixes common plugin symbols to known ordinals" << endl;
- t << "; Version : " << endl;
- t << ";" << endl;
- t << "; ==============================================================================" << "\n" << endl;
-
- t << endl;
-
- t << "EXPORTS" << endl;
- t << "\tqt_plugin_query_verification_data @ 1 NONAME" << endl;
- t << "\tqt_plugin_instance @ 2 NONAME" << endl;
- t << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(QString(PLUGIN_COMMON_DEF_FILE_ACTUAL))
- }
- }
-}
-
void SymbianMakefileGenerator::init()
{
MakefileGenerator::init();
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index a584a9a..c5b6907 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -117,8 +117,6 @@ protected:
void writeMmpFileBinaryVersionPart(QTextStream& t);
void writeMmpFileRulesPart(QTextStream& t);
- void writeCustomDefFile();
-
void appendIfnotExist(QStringList &list, QString value);
void appendIfnotExist(QStringList &list, QStringList values);
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 107854c..353e8b9 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -42,6 +42,16 @@
#ifndef QENDIAN_H
#define QENDIAN_H
+#ifdef Q_OS_LINUX
+QT_BEGIN_INCLUDE_NAMESPACE
+# include <features.h>
+QT_END_INCLUDE_NAMESPACE
+#endif
+
+#ifdef __GLIBC__
+#include <byteswap.h>
+#endif
+
#include <QtCore/qglobal.h>
QT_BEGIN_HEADER
@@ -264,6 +274,21 @@ template <> inline qint16 qFromBigEndian<qint16>(const uchar *src)
* and it is therefore a bit more convenient and in most cases more efficient.
*/
template <typename T> T qbswap(T source);
+
+#ifdef __GLIBC__
+template <> inline quint64 qbswap<quint64>(quint64 source)
+{
+ return bswap_64(source);
+}
+template <> inline quint32 qbswap<quint32>(quint32 source)
+{
+ return bswap_32(source);
+}
+template <> inline quint16 qbswap<quint16>(quint16 source)
+{
+ return bswap_16(source);
+}
+#else
template <> inline quint64 qbswap<quint64>(quint64 source)
{
return 0
@@ -292,6 +317,7 @@ template <> inline quint16 qbswap<quint16>(quint16 source)
| ((source & 0x00ff) << 8)
| ((source & 0xff00) >> 8) );
}
+#endif // __GLIBC__
// signed specializations
template <> inline qint64 qbswap<qint64>(qint64 source)
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 20e4b50..fd2c139 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1766,6 +1766,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
function returns the actual matrix used for transforming the
pixmap.
+ \note When using the native X11 graphics system, the pixmap
+ becomes invalid when the QApplication instance is destroyed.
+
\sa QBitmap, QImage, QImageReader, QImageWriter
*/
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 6bebefc..e8dc5ae 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1250,10 +1250,8 @@ void QX11PixmapData::release()
pengine = 0;
if (!X11) {
-#ifndef QT_NO_DEBUG
- qWarning("~QX11PixmapData(): QPixmap objects must be destroyed before the QApplication"
- " object, otherwise the native pixmap object will be leaked.");
-#endif
+ // At this point, the X server will already have freed our resources,
+ // so there is nothing to do.
return;
}
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 4978565..039a6da 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -762,7 +762,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
#ifndef QT_NO_ITEMVIEWS
case PE_PanelItemViewRow:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
@@ -775,7 +775,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
break;
case PE_PanelItemViewItem:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index b59a033..c989bd3 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -855,9 +855,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
key = QLS("a");
GTK_WIDGET_SET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
}
+ bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled));
gtkPainter.paintFlatBox(gtkTreeView, detail, option->rect,
option->state & State_Selected ? GTK_STATE_SELECTED :
- option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
+ isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
GTK_SHADOW_OUT, gtkTreeView->style, key);
if (isActive )
GTK_WIDGET_UNSET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index c1e254c..527b603 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -145,7 +145,7 @@ QTextOption &QTextOption::operator=(const QTextOption &o)
\sa tabArray(), setTabStop(), setTabs()
*/
-void QTextOption::setTabArray(QList<qreal> tabStops)
+void QTextOption::setTabArray(QList<qreal> tabStops) // Qt5: const ref
{
if (!d)
d = new QTextOptionPrivate;
@@ -165,7 +165,7 @@ void QTextOption::setTabArray(QList<qreal> tabStops)
\sa tabStops()
*/
-void QTextOption::setTabs(QList<QTextOption::Tab> tabStops)
+void QTextOption::setTabs(QList<QTextOption::Tab> tabStops) // Qt5: const ref
{
if (!d)
d = new QTextOptionPrivate;
@@ -391,6 +391,12 @@ QList<QTextOption::Tab> QTextOption::tabs() const
*/
/*!
+ \fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar())
+ Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter
+ \since 4.7
+*/
+
+/*!
\fn bool Tab::operator==(const Tab &other) const
Returns true if tab \a other is equal to this tab;
diff --git a/src/gui/text/qtextoption.h b/src/gui/text/qtextoption.h
index 1381ed1..5af7834 100644
--- a/src/gui/text/qtextoption.h
+++ b/src/gui/text/qtextoption.h
@@ -68,6 +68,8 @@ public:
struct Q_GUI_EXPORT Tab {
inline Tab() : position(80), type(QTextOption::LeftTab) { }
+ inline Tab(qreal pos, TabType tabType, QChar delim = QChar())
+ : position(pos), type(tabType), delimiter(delim) {}
inline bool operator==(const Tab &other) const {
return type == other.type
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index a9cb65b..6ba9504 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -70,9 +70,10 @@
#include <net/if.h>
#include <ifaddrs.h>
-@interface QNSListener : NSObject
+
+@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
{
- NSNotificationCenter *center;
+ NSNotificationCenter *notificationCenter;
CWInterface *currentInterface;
QCoreWlanEngine *engine;
NSLock *locker;
@@ -86,16 +87,16 @@
@end
-@implementation QNSListener
+@implementation QT_MANGLE_NAMESPACE(QNSListener)
@synthesize engine;
- (id) init
{
[locker lock];
QMacCocoaAutoReleasePool pool;
- center = [NSNotificationCenter defaultCenter];
+ notificationCenter = [NSNotificationCenter defaultCenter];
currentInterface = [CWInterface interfaceWithName:nil];
- [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
+ [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
[locker unlock];
return self;
}
@@ -116,7 +117,7 @@
-(void)remove
{
[locker lock];
- [center removeObserver:self];
+ [notificationCenter removeObserver:self];
[locker unlock];
}
@@ -126,7 +127,7 @@
}
@end
-QNSListener *listener = 0;
+QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
QT_BEGIN_NAMESPACE
@@ -296,6 +297,9 @@ void QScanThread::getUserConfigurations()
for(uint row=0; row < [wifiInterfaces count]; row++ ) {
CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
+ if ( ![wifiInterface power] )
+ continue;
+
NSString *nsInterfaceName = [wifiInterface name];
// add user configured system networks
SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
@@ -430,7 +434,7 @@ void QCoreWlanEngine::initialize()
QMacCocoaAutoReleasePool pool;
if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
- listener = [[QNSListener alloc] init];
+ listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
listener.engine = this;
hasWifi = true;
} else {
@@ -785,6 +789,11 @@ void QCoreWlanEngine::networksChanged()
changed = true;
}
+ if (ptr->bearer != cpPriv->bearer) {
+ ptr->bearer = cpPriv->bearer;
+ changed = true;
+ }
+
if (ptr->state != cpPriv->state) {
ptr->state = cpPriv->state;
changed = true;
diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri
index 1a6f4a2..4e15102 100644
--- a/src/plugins/s60/s60pluginbase.pri
+++ b/src/plugins/s60/s60pluginbase.pri
@@ -8,11 +8,16 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60
MMP_RULES += NOEXPORTLIBRARY
-defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ../bwins/qts60plugin.def" \
- "$${LITERAL_HASH}else" \
- "DEFFILE ../eabi/qts60plugin.def" \
- "$${LITERAL_HASH}endif"
+symbian-abld|symbian-sbsv2 {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ../bwins/qts60plugin.def" \
+ "$${LITERAL_HASH}else" \
+ "DEFFILE ../eabi/qts60plugin.def" \
+ "$${LITERAL_HASH}endif"
+} else {
+ CONFIG *= def_files
+ DEF_FILE = ../eabi/qts60pluginu.def
+}
MMP_RULES += defBlock \ No newline at end of file
diff --git a/tests/auto/qtextformat/tst_qtextformat.cpp b/tests/auto/qtextformat/tst_qtextformat.cpp
index ee1f4b5..9b71481 100644
--- a/tests/auto/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/qtextformat/tst_qtextformat.cpp
@@ -308,10 +308,7 @@ void tst_QTextFormat::getSetTabs()
format.setTabPositions(tabs);
Comparator c2(tabs, format.tabPositions());
- QTextOption::Tab tab2;
- tab2.position = 3456;
- tab2.type = QTextOption::RightTab;
- tab2.delimiter = QChar('x');
+ QTextOption::Tab tab2(3456, QTextOption::RightTab, QChar('x'));
tabs.append(tab2);
format.setTabPositions(tabs);
Comparator c3(tabs, format.tabPositions());
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index 1a5f493..a631f3d 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -980,9 +980,7 @@ void tst_QTextLayout::testCenteredTab()
// test if centering the tab works. We expect the center of 'Bar.' to be at the tab point.
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab;
- tab.type = QTextOption::CenterTab;
- tab.position = 150;
+ QTextOption::Tab tab(150, QTextOption::CenterTab);
tabs.append(tab);
option.setTabs(tabs);
layout.setTextOption(option);
@@ -1002,10 +1000,7 @@ void tst_QTextLayout::testDelimiterTab()
// try the different delimiter characters to see if the alignment works there.
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab;
- tab.type = QTextOption::DelimiterTab;
- tab.delimiter = QChar('.');
- tab.position = 100;
+ QTextOption::Tab tab(100, QTextOption::DelimiterTab, QChar('.'));
tabs.append(tab);
option.setTabs(tabs);
layout.setTextOption(option);
diff --git a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
index 64c42bb..a463d86 100644
--- a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -198,14 +198,9 @@ void tst_QTextOdfWriter::testWriteStyle2()
{
QTextBlockFormat bf; // = cursor.blockFormat();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab1;
- tab1.position = 40;
- tab1.type = QTextOption::RightTab;
+ QTextOption::Tab tab1(40, QTextOption::RightTab);
tabs << tab1;
- QTextOption::Tab tab2;
- tab2.position = 80;
- tab2.type = QTextOption::DelimiterTab;
- tab2.delimiter = 'o';
+ QTextOption::Tab tab2(80, QTextOption::DelimiterTab, 'o');
tabs << tab2;
bf.setTabPositions(tabs);
diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
index ec63858..6e10e3f 100644
--- a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
+++ b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
@@ -141,8 +141,6 @@ void tst_SuiteTest::checkTestSuiteResult() const
/* Passed to ResultThreader so it knows what kind of file it is handling. */
ResultThreader::Type type = ResultThreader::Baseline;
- QProcess::execute(QLatin1String("p4 edit ") + m_existingBaseline);
-
for(QFileInfoList::const_iterator it(list.constBegin()); it != end; ++it)
{
QFileInfo i(*it);
@@ -167,8 +165,6 @@ void tst_SuiteTest::checkTestSuiteResult() const
const int exitCode = eventLoop.exec();
- QProcess::execute(QLatin1String("p4 revert -a ") + m_existingBaseline);
-
QCOMPARE(exitCode, 0);
}
diff --git a/translations/check-ts.pl b/translations/check-ts.pl
new file mode 100755
index 0000000..7b46bf5
--- /dev/null
+++ b/translations/check-ts.pl
@@ -0,0 +1,85 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+# "qt" must come last to avoid prefix matching.
+my @groups = ("assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb", "qt");
+
+my %scores = ();
+my %langs = ();
+
+my $files = join("\n", <*.ts>);
+my $res = `xmlpatterns -param files=\"$files\" check-ts.xq`;
+for my $i (split(/ /, $res)) {
+ $i =~ /^([^.]+).ts:(.*)$/;
+ my ($fn, $pc) = ($1, $2);
+ for my $g (@groups) {
+ if ($fn =~ /^${g}_(.*)$/) {
+ my $lang = $1;
+ $scores{$g}{$lang} = $pc;
+ $langs{$lang} = 1;
+ last;
+ }
+ }
+}
+
+# now we move "qt" to the front, as it should be the first column.
+pop @groups;
+unshift @groups, "qt";
+
+my $code = "";
+
+print "L10n ";
+for my $g (@groups) {
+ print " ".$g." ";
+}
+print "\n";
+for my $lang (sort(keys(%langs))) {
+ printf "%-5s ", $lang;
+ my $qt = 1;
+ my $rest = 1;
+ my $line = "";
+ for my $g (@groups) {
+ my $pc = $scores{$g}{$lang};
+ $pc = "0" if !defined($pc);
+ if (int($pc) < 98 or !$qt) {
+ if ($g eq "qt") {
+ $qt = 0;
+ } else {
+ $rest = 0;
+ }
+ } else {
+ $line .= " ".$g."_".$lang.".ts";
+ }
+ printf " %-".(length($g)+1)."s", $pc;
+ }
+ if ($qt) {
+ $code .= " \\\n ".$line;
+ if (!$rest) {
+ print " (partial)";
+ }
+ } else {
+ print " (excluded)";
+ }
+ print "\n";
+}
+
+my $fn = "translations.pro";
+my $nfn = $fn."new";
+open IN, $fn or die;
+open OUT, ">".$nfn or die;
+while (1) {
+ $_ = <IN>;
+ last if (/^TRANSLATIONS /);
+ print OUT $_;
+}
+while ($_ =~ /\\\n$/) {
+ $_ = <IN>;
+}
+print OUT "TRANSLATIONS =".$code."\n";
+while (<IN>) {
+ print OUT $_;
+}
+close OUT;
+close IN;
+rename $nfn, $fn;
diff --git a/translations/check-ts.xq b/translations/check-ts.xq
new file mode 100644
index 0000000..2d6404c
--- /dev/null
+++ b/translations/check-ts.xq
@@ -0,0 +1,3 @@
+for $file in tokenize($files, codepoints-to-string(10))
+ let $fresh := doc($file)/TS/context/message[not (translation/@type = 'obsolete')]
+ return concat($file, ":", count($fresh/translation[not (@type = 'unfinished')]) * 100 idiv count($fresh))
diff --git a/translations/qt_ja_JP.ts b/translations/qt_ja.ts
index e6f92b7..e6f92b7 100644
--- a/translations/qt_ja_JP.ts
+++ b/translations/qt_ja.ts
diff --git a/translations/translations.pri b/translations/translations.pri
index 2edc89a..9ab72fc 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -13,7 +13,7 @@ LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
-QT_TS = ar cs da de es fr he hu ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
+QT_TS = ar cs da de es fr he hu ja pl pt ru sk sl sv uk zh_CN zh_TW
ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
-I../include -I../include/Qt \
@@ -73,5 +73,8 @@ ts-qvfb.depends = sub-tools
ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb
+check-ts.commands = (cd $$PWD && perl check-ts.pl)
+check-ts.depends = ts
+
QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \
- ts
+ ts check-ts