summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure24
-rw-r--r--mkspecs/features/qt_config.prf6
-rw-r--r--src/declarative/declarative.pro7
-rw-r--r--src/gui/kernel/qapplication_s60.cpp4
-rw-r--r--src/gui/text/qfont_s60.cpp18
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp2
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/opengl/opengl.pro7
-rw-r--r--src/openvg/openvg.pro7
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp12
11 files changed, 86 insertions, 5 deletions
diff --git a/configure b/configure
index b11d82d..b60da9e 100755
--- a/configure
+++ b/configure
@@ -934,6 +934,16 @@ if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
fi
+CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
+if [ -d "$relpath/src/plugins/imageformats" ]; then
+ for a in "$relpath/src/plugins/imageformats/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename "$a"`
+ CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
+ fi
+ done
+fi
+
#-------------------------------------------------------------------------------
# Set Default NaCl options
#-------------------------------------------------------------------------------
@@ -2140,7 +2150,7 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
+ sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
# if Qt style options were used, $VAL can be "no", "qt", or "plugin"
# if autoconf style options were used, $VAL can be "yes" or "no"
[ "$VAL" = "yes" ] && VAL=qt
@@ -2182,6 +2192,13 @@ while [ "$#" -gt 0 ]; do
avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
fi
;;
+ imageformat)
+ avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
+ if [ "$OPT" != "plugin" ]; then
+ # png is always built in
+ avail="$avail png"
+ fi
+ ;;
*)
avail=""
echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
@@ -2202,6 +2219,11 @@ while [ "$#" -gt 0 ]; do
# set the CFG_SQL_driver
eval "CFG_SQL_$VAL=\$OPT"
continue
+ elif [ "$VAR" = "imageformat" ]; then
+ [ "$OPT" = "qt" ] && OPT=yes
+ VAL="`echo $VAL |tr a-z A-Z`"
+ eval "CFG_$VAL=$OPT"
+ continue
fi
if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 19e01a1..de1cac4 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -11,7 +11,11 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
debug(1, "Cannot load qconfig.pri!")
} else {
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
- for(mod, $$list($$files($$dirname(QMAKE_QT_CONFIG)/modules/qt_*.pri))):include($$mod)
+ for(dir, $$list($$unique($$list($$dirname(QMAKE_QT_CONFIG) \
+ $$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))))) {
+ debug(1, "Loading modules from $${dir}")
+ for(mod, $$list($$files($$dir/modules/qt_*.pri))):include($$mod)
+ }
}
load(qt_functions)
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 4ed4f9f..6bd314f 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -27,6 +27,13 @@ include(debugger/debugger.pri)
symbian: {
TARGET.UID3=0x2001E623
LIBS += -lefsrv
+
+ contains(QT_CONFIG, freetype) {
+ DEFINES += QT_NO_FONTCONFIG
+ INCLUDEPATH += \
+ ../3rdparty/freetype/src \
+ ../3rdparty/freetype/include
+ }
}
DEFINES += QT_NO_OPENTYPE
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 554baa2..a9f57f4 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1616,7 +1616,9 @@ void qt_init(QApplicationPrivate * /* priv */, int)
qRegisterMetaType<WId>("WId");
}
+#ifdef QT_NO_FREETYPE
extern void qt_cleanup_symbianFontDatabase(); // qfontdatabase_s60.cpp
+#endif
/*****************************************************************************
qt_cleanup() - cleans up when the application is finished
@@ -1633,7 +1635,9 @@ void qt_cleanup()
QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles
+#ifdef QT_NO_FREETYPE
qt_cleanup_symbianFontDatabase();
+#endif
// S60 structure and window server session are freed in eventdispatcher destructor as they are needed there
// It's important that this happens here, before the event dispatcher gets
diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
index c7d36ef..114191d 100644
--- a/src/gui/text/qfont_s60.cpp
+++ b/src/gui/text/qfont_s60.cpp
@@ -49,13 +49,14 @@ QT_BEGIN_NAMESPACE
#ifdef QT_NO_FREETYPE
Q_GLOBAL_STATIC(QMutex, lastResortFamilyMutex);
+#endif // QT_NO_FREETYPE
+
extern QStringList qt_symbian_fontFamiliesOnFontServer(); // qfontdatabase_s60.cpp
Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, fontFamiliesOnFontServer, {
// We are only interested in the initial font families. No Application fonts.
// Therefore, we are allowed to cache the list.
x->append(qt_symbian_fontFamiliesOnFontServer());
});
-#endif // QT_NO_FREETYPE
QString QFont::lastResortFont() const
{
@@ -95,7 +96,20 @@ QString QFont::lastResortFamily() const
const bool isJapaneseOrChineseSystem =
User::Language() == ELangJapanese || User::Language() == ELangPrcChinese;
- return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":"Series 60 Sans");
+ static QString family;
+ if (family.isEmpty()) {
+ QStringList families = qt_symbian_fontFamiliesOnFontServer();
+ const char* const preferredFamilies[] = {"Nokia Sans S60", "Series 60 Sans"};
+ for (int i = 0; i < sizeof preferredFamilies / sizeof preferredFamilies[0]; ++i) {
+ const QString preferredFamily = QLatin1String(preferredFamilies[i]);
+ if (families.contains(preferredFamily)) {
+ family = preferredFamily;
+ break;
+ }
+ }
+ }
+
+ return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":family.toLatin1());
#endif // QT_NO_FREETYPE
}
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 97426a8..6d3970e 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -464,6 +464,7 @@ void QFontEngineMultiS60::loadEngine(int at)
Q_ASSERT(engines[at]);
}
+#ifdef QT_NO_FREETYPE
static bool registerScreenDeviceFont(int screenDeviceFontIndex,
const QSymbianFontDatabaseExtrasImplementation *dbExtras)
{
@@ -525,6 +526,7 @@ static bool registerScreenDeviceFont(int screenDeviceFontIndex,
family->writingSystems[system] = QtFontFamily::Supported;
return true;
}
+#endif
static void initializeDb()
{
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index daafdd9..d3e8f2d 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -147,8 +147,8 @@ symbian {
text/qfontengine_s60.cpp
HEADERS += \
text/qfontengine_s60_p.h
- LIBS += -lfntstr -lecom
}
+ LIBS += -lfntstr -lecom
}
!qpa {
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 8b587cf..08ae774 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -163,6 +163,13 @@ symbian {
HEADERS += qgl_egl_p.h
+ contains(QT_CONFIG, freetype) {
+ DEFINES += QT_NO_FONTCONFIG
+ INCLUDEPATH += \
+ ../3rdparty/freetype/src \
+ ../3rdparty/freetype/include
+ }
+
symbian:TARGET.UID3 = 0x2002131A
}
diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
index e7ed890..e185949 100644
--- a/src/openvg/openvg.pro
+++ b/src/openvg/openvg.pro
@@ -38,6 +38,13 @@ symbian {
DEFINES += QVG_RECREATE_ON_SIZE_CHANGE QVG_BUFFER_SCROLLING QVG_SCISSOR_CLIP
SOURCES += \
qvg_symbian.cpp
+
+ contains(QT_CONFIG, freetype) {
+ DEFINES += QT_NO_FONTCONFIG
+ INCLUDEPATH += \
+ ../3rdparty/freetype/src \
+ ../3rdparty/freetype/include
+ }
}
include(../qbase.pri)
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 608d876..1245646 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -65,6 +65,7 @@ HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qstringlist.h \
$$QT_SOURCE_TREE/src/corelib/tools/qstringmatcher.h \
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \
+ $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror_p.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \
$$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \
@@ -111,6 +112,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qvsnprintf.cpp \
$$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \
+ $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qurl.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qline.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qsize.cpp \
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 64fc6a9..6b87c8e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -437,6 +437,7 @@ void Configure::parseCmdLine()
{
int argCount = configCmdLine.size();
int i = 0;
+ const QStringList imageFormats = QStringList() << "gif" << "png" << "mng" << "jpeg" << "tiff";
#if !defined(EVAL)
if (argCount < 1) // skip rest if no arguments
@@ -829,6 +830,17 @@ void Configure::parseCmdLine()
dictionary[ "SQL_IBASE" ] = "plugin";
else if (configCmdLine.at(i) == "-no-sql-ibase")
dictionary[ "SQL_IBASE" ] = "no";
+
+ // Image formats --------------------------------------------
+ else if (configCmdLine.at(i).startsWith("-qt-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes";
+ else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin";
+ else if (configCmdLine.at(i).startsWith("-no-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no";
#endif
// IDE project generation -----------------------------------
else if (configCmdLine.at(i) == "-no-dsp")