aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Ionascu <stanislav.ionascu@nokia.com>2011-01-13 15:14:36 +0200
committerStanislav Ionascu <stanislav.ionascu@nokia.com>2011-01-13 15:37:38 +0200
commitf3b89e79272f9b2e271e5e29edd5d239fbebddff (patch)
tree3bdf9f335427ca3f40218febcf00670cad9e238b
parent26ff3ac7c79998a10d929cbc18893deae2a724a0 (diff)
Fixes: If the development views shared object is not installed the library is not found.
RevBy: Tomas Junnonen Details: QLibrary explicitly tries to load .so shared objects, thus in case if it's not found for the theme try to load the library with meegotouch major number versioning suffix.
-rwxr-xr-xconfigure3
-rw-r--r--src/common_top.pri4
-rw-r--r--src/corelib/theme/mtheme.cpp7
3 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index d37ea808..b4b337fd 100755
--- a/configure
+++ b/configure
@@ -661,6 +661,9 @@ M_BUILD_FEATURES += $MEEGOTOUCHCONFIG_FEATURES
#versioning
M_VERSION = $M_VERSION
+M_MAJOR_VERSION = $M_MAJOR_VERSION
+M_MINOR_VERSION = $M_MINOR_VERSION
+M_PATCH_VERSION = $M_PATCH_VERSION
#paths
M_INSTALL_PREFIX = $M_INSTALL_PREFIX
diff --git a/src/common_top.pri b/src/common_top.pri
index 85a6ad70..ad2bca21 100644
--- a/src/common_top.pri
+++ b/src/common_top.pri
@@ -14,6 +14,10 @@ include(../mkspecs/features/meegotouch_mgen.prf)
VERSION = $${M_VERSION}
DEFINES += M_VERSION=\\\"$${M_VERSION}\\\"
+DEFINES += M_MAJOR_VERSION=$${M_MAJOR_VERSION}
+DEFINES += M_MINOR_VERSION=$${M_MINOR_VERSION}
+DEFINES += M_PATCH_VERSION=$${M_PATCH_VERSION}
+
INCLUDEPATH += $${M_SOURCE_TREE}/src/include
INCLUDEPATH += $${OUT_PWD}/.moc
INCLUDEPATH += $${OUT_PWD}/.gen
diff --git a/src/corelib/theme/mtheme.cpp b/src/corelib/theme/mtheme.cpp
index 3d108f0e..5bf58005 100644
--- a/src/corelib/theme/mtheme.cpp
+++ b/src/corelib/theme/mtheme.cpp
@@ -881,7 +881,12 @@ void MThemePrivate::reloadThemeLibraries(const QStringList& libraryNames)
openedThemeLibraries.clear();
foreach(const QString& libname, libraryNames) {
QLibrary* library = new QLibrary(libname + libsuffix);
- if(library->load()) {
+ if(!library->load()) {
+ library->setFileNameAndVersion(libname + libsuffix, M_MAJOR_VERSION);
+ library->load();
+ }
+
+ if (library->isLoaded()) {
openedThemeLibraries.insert(library);
} else {
mWarning("MTheme") << "Failed to open theme library:" << libname;