summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/build_release_package.pl285
-rwxr-xr-xconfigure.exebin1187840 -> 868352 bytes
-rw-r--r--src/gui/kernel/qapplication.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp30
-rw-r--r--src/gui/styles/qs60style_simulated.cpp1
-rw-r--r--src/gui/widgets/qmenu.h3
-rw-r--r--src/gui/widgets/qmenu_p.h1
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp34
-rw-r--r--src/gui/widgets/qmenubar.h4
-rw-r--r--src/gui/widgets/qmenubar_p.h2
-rw-r--r--src/s60main/qts60mainappui.cpp2
11 files changed, 31 insertions, 333 deletions
diff --git a/bin/build_release_package.pl b/bin/build_release_package.pl
deleted file mode 100644
index 62390eb..0000000
--- a/bin/build_release_package.pl
+++ /dev/null
@@ -1,285 +0,0 @@
-#######################################################################
-#
-# A script for creating binary release package
-#
-# Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
-# Contact: Qt Software Information (qt-info@nokia.com)
-#
-#######################################################################
-
-my $buildContentDemoValue = "libs+demo";
-
-if (@ARGV)
-{
- my $buildContent = shift(@ARGV);
- my $platform = shift(@ARGV);
- my $build = shift(@ARGV);
- my $cert = shift(@ARGV);
- my $certKey = shift(@ARGV);
- my $releaseDir = shift(@ARGV);
- my $qtRootDir = shift(@ARGV);
- my $epocroot = shift(@ARGV);
-
- if ($buildContent eq "")
- {
- print("Build content parameter required!\n");
- exit 2;
- }
-
- if ($platform eq "")
- {
- print("HW platform parameter required!\n");
- exit 2;
- }
-
- if ($build eq "")
- {
- print("HW build parameter required!\n");
- exit 2;
- }
-
- if ($cert eq "")
- {
- print("Signing certificate parameter required!\n");
- exit 2;
- }
-
- if ($certKey eq "")
- {
- print("Signing certificate key parameter required!\n");
- exit 2;
- }
-
- if ($releaseDir eq "")
- {
- print("Release directory parameter required!\n");
- exit 2;
- }
-
- if ($qtRootDir eq "")
- {
- print("Qt root directory parameter required!\n");
- exit 2;
- }
-
- if ($epocroot eq "")
- {
- print("Epocroot directory parameter required!\n");
- exit 2;
- }
-
- # Lose the ending separator if any
- $qtRootDir =~ s/\\$//;
- $epocroot =~ s/\\$//;
-
- chdir($qtRootDir);
-
- # Lose the drive designator from epocroot
- $epocroot =~ s/.://;
-
- my $releaseDirQt = "${releaseDir}\\qt";
- my $releaseDirEpocroot = "${releaseDir}\\epocroot";
- my $releaseDirSis = $releaseDirQt; # Put sis files to Qt source dir root
-
- my $qtRootDirForMatch = $qtRootDir; # Double backslashes so that variable can be used in matching
- $qtRootDirForMatch =~ s/\\/\\\\/g;
-
- my $pkgFileName = "src\\s60installs\\qt_libs_${platform}_${build}.pkg";
- my $demoAppPkgFileName = "demos\\embedded\\fluidlauncher\\fluidlauncher_${platform}_${build}.pkg";
- my $sisFileNameBase = "qt_libs";
- my $demoAppSisFileNameBase = "fluidlauncher";
-
- my $hwBuildDir = "${epocroot}\\epoc32\\release\\$platform\\$build";
- my $armDbgDir = "epoc32\\release\\armv5\\udeb";
- my $armRelDir = "epoc32\\release\\armv5\\urel";
- my $armLibDir = "epoc32\\release\\armv5\\lib";
- my $winscwDbgDir = "epoc32\\release\\winscw\\udeb";
-
- # clean up old stuff
- system("rd /S /Q ${releaseDir} 2> NUL");
- system("rd /S /Q ${epocroot}\\epoc32\\build 2> NUL"); # Just in case env is not clean
-
- # Copy the whole thing over to the release dir before it gets polluted
- print("Copying clean tree...\n");
- my $tempExcludeFile = "${releaseDir}\\__temp_exclude.txt";
- system("mkdir ${releaseDir} 2>NUL");
- runSystemCmd("echo ${qtRootDir}\\.git\\ > ${tempExcludeFile}");
- runSystemCmd("echo ${qtRootDir}\\tests\\ >> ${tempExcludeFile}");
- runSystemCmd("echo ${qtRootDir}\\util\\ >> ${tempExcludeFile}");
- runSystemCmd("xcopy ${qtRootDir} ${releaseDirQt} /E /I /H /Q /EXCLUDE:${tempExcludeFile}");
- system("del /F /Q ${tempExcludeFile} 2> NUL");
-
- # Clear archive flag from all items in \epoc32\release\armv5\urel and \epoc32\release\armv5\lib
- # as those will have the binaries used for all platforms and builds.
- runSystemCmd("attrib -A ${hwBuildDir}\\*");
- runSystemCmd("attrib -A ${epocroot}\\${armLibDir}\\*");
- runSystemCmd("attrib -A ${epocroot}\\${winscwDbgDir}\\*");
-
- # Build Qt
- runSystemCmd("configure -platform win32-mwc -xplatform symbian-abld -qt-sql-sqlite -system-sqlite -confirm-license -opensource");
- buildDir("src", $qtRootDir, $platform, $build, "winscw");
-
- # Copy misc stuff
- runSystemCmd("xcopy ${qtRootDir}\\bin\\* ${releaseDirQt}\\bin /F /R /Y /I /D");
- runSystemCmd("xcopy ${qtRootDir}\\lib\\*.prl ${releaseDirQt}\\lib /F /R /Y /I /D /E");
- runSystemCmd("xcopy ${qtRootDir}\\mkspecs\\* ${releaseDirQt}\\mkspecs /F /R /Y /I /D /E");
- print("Copying includes...\n");
- runSystemCmd("xcopy ${qtRootDir}\\include\\* ${releaseDirQt}\\include /F /R /Y /I /D /E /Q");
- runSystemCmd("copy src\\corelib\\global\\qconfig.h ${releaseDirQt}\\src\\corelib\\global\\qconfig.h");
- runSystemCmd("copy .qmake.cache ${releaseDirQt}\\.qmake.cache");
-
- # Copy stuff indicated by pkg file for emulator
- parsePkgFile($pkgFileName, $epocroot, $build, $platform, $releaseDirEpocroot, $qtRootDirForMatch, $releaseDirQt);
-
- # Copy any other binaries and related files built not included in pkg
- runSystemCmd("xcopy ${hwBuildDir}\\* ${releaseDirEpocroot}\\${armDbgDir} /A /F /R /Y /I /D ");
- runSystemCmd("xcopy ${releaseDirEpocroot}\\${armDbgDir}\\* ${releaseDirEpocroot}\\${armRelDir} /F /R /Y /I /D");
- system("del /F /Q ${releaseDirEpocroot}\\${armRelDir}\\*.sym 2> NUL");
- runSystemCmd("xcopy ${epocroot}\\${armLibDir}\\* ${releaseDirEpocroot}\\${armLibDir} /A /F /R /Y /I /D");
- runSystemCmd("xcopy ${epocroot}\\${winscwDbgDir}\\* ${releaseDirEpocroot}\\${winscwDbgDir} /A /F /R /Y /I /D");
-
- if ($buildContent eq $buildContentDemoValue)
- {
- # Also build demos & examples and add fluidlauncher sis
- buildDir("examples", $qtRootDir, $platform, $build);
- buildDir("demos", $qtRootDir, $platform, $build);
- # Do not include binaries for demo apps as winscw versions are not BC accross all S60 platform versions
- #parsePkgFile($demoAppPkgFileName, $epocroot, $build, $platform, $releaseDirEpocroot, $qtRootDirForMatch, $releaseDirQt);
- createSis($demoAppPkgFileName, $releaseDirSis, "selfsigned.cer", "selfsigned.key", $demoAppSisFileNameBase);
- }
-
- # Create unsigned sis and Rnd signed sisx
- createSis($pkgFileName, $releaseDirSis, $cert, $certKey, $sisFileNameBase);
-
-}
-else
-{
- print("Usage:\n");
- print("build_release_package.pl <build content (${buildContentDemoValue}|libs)> <hw platform> <hw build> <signing cert> <signing cert key> <release directory> <QTROOT> <EPOCROOT>\n");
- print("1) Clean up the env. (abld reallyclean & delete \\my\\epoc\\root\\build folder)\n");
- print("2) Run \"build_release_package.pl armv5 udeb \\rd.cer \\rd-key.pem \\my_release_dir [\\my\\qt\\root\\] [\\my\\epoc\\root\\]>\"\n");
- print(" to build Qt and create the release package structure and sis file.\n");
- print(" Note: Run in the Qt root directory.\n");
- print("3) Optional: Get the sis signed with commercial certificate (can be found in qt directory under release directory)\n");
- print("4) Zip up the release directory contents\n");
-}
-
-sub runSystemCmd
-{
- my $error_code = system($_[0]);
- if ($error_code != 0)
- {
- print("'$_[0]' call failed: error code == $error_code\n");
- exit 9;
- }
-}
-
-sub parsePkgFile
-{
- my $epocroot = $_[1];
- my $build = $_[2];
- my $platform = $_[3];
- my $releaseDirEpocroot = $_[4];
- my $qtRootDirForMatch = $_[5];
- my $releaseDirQt = $_[6];
-
- open (PKG, "<".$_[0]);
- while (<PKG>)
- {
- my $line = $_;
- chomp ($line);
-
- # If the line specifies a file, parse the source and destination locations.
- if ($line =~ m/\"([^\"]+)\"\s*\-\s*\"([^\"]+)\"/)
- {
- my $sourcePath = $1;
- my $pkgDestinationPath = $2;
- $sourcePath =~ s/\//\\/g;
-
- # Copy stuff required for creating deployment package
- my $destinationPath = $sourcePath;
-
- if($destinationPath =~ m/($qtRootDirForMatch)/i)
- {
- $destinationPath =~ s/($qtRootDirForMatch)//i;
- $destinationPath = $releaseDirQt.$destinationPath;
- }
- else
- {
- $destinationPath =~ s/.://;
- if ($epocroot !~ m/\\/)
- {
- $destinationPath =~ s/($epocroot)//i;
- }
- $destinationPath = $releaseDirEpocroot.$destinationPath;
- }
-
- runSystemCmd("echo f|xcopy ${sourcePath} ${destinationPath} /F /R /Y /I /D");
-
- if ($sourcePath !~ m/\\epoc32\\release\\([^\\]+)\\(udeb|urel)\\(\w+(\.dll|\.exe))/i)
- {
- # Copy non-binaries also over for emulator to use
- if ($pkgDestinationPath =~ m/(private\\10003a3f\\import\\apps|resource\\apps)/i)
- {
- $pkgDestinationPath =~ s/!:/${releaseDirEpocroot}\\epoc32\\release\\winscw\\udeb\\z/g;
- }
- else
- {
- $pkgDestinationPath =~ s/!:/${releaseDirEpocroot}\\epoc32\\winscw\\c/g;
- }
-
- runSystemCmd("echo f|xcopy ${sourcePath} ${pkgDestinationPath} /F /R /Y /I /D");
- }
- else
- {
- # For binaries, copy also winscw versions (needed for deployed binaries that are not actually built)
- $sourcePath =~ s/epoc32\\release\\${platform}\\${build}/epoc32\\release\\winscw\\udeb/;
- $destinationPath =~ s/epoc32\\release\\${platform}\\${build}/epoc32\\release\\winscw\\udeb/;
- runSystemCmd("echo f|xcopy ${sourcePath} ${destinationPath} /F /R /Y /I /D");
- }
-
- }
- }
- close (PKG);
-}
-
-sub createSis
-{
- my $pkgFileName = $_[0];
- my $releaseDirSis = $_[1];
- my $cert = $_[2];
- my $certKey = $_[3];
- my $sisFileNameBase = $_[4];
- my $signedSuffix = ".sis";
- my $unsignedSuffix = "_unsigned.sis";
-
- if ($cert =~ m/rd\.cer/i)
- {
- $signedSuffix = "_rnd.sis";
- }
-
- my $sisFileName = $sisFileNameBase.$unsignedSuffix;
- my $signedSisFileName = $sisFileNameBase.$signedSuffix;
- system("mkdir ${releaseDirSis} 2> NUL");
- runSystemCmd("makesis ${pkgFileName} ${releaseDirSis}\\${sisFileName}");
- runSystemCmd("signsis ${releaseDirSis}\\${sisFileName} ${releaseDirSis}\\${signedSisFileName} ${cert} ${certKey}");
-}
-
-sub buildDir
-{
- my $buildDir = $_[0];
- my $qtRootDir = $_[1];
- my $platform = $_[2];
- my $build = $_[3];
- my $extra = $_[4];
-
- chdir($buildDir);
- runSystemCmd("qmake");
- runSystemCmd("bldmake bldfiles");
- runSystemCmd("abld build ${platform} ${build}");
- if ($extra =~ m/winscw/i)
- {
- runSystemCmd("abld build winscw udeb");
- }
- chdir($qtRootDir);
-}
diff --git a/configure.exe b/configure.exe
index c4b5d7f..7d8861e 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index ca0eb98..f9559fa 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -233,7 +233,7 @@ public:
#if defined(Q_WS_S60)
int s60ProcessEvent(TWsEvent *event);
virtual bool s60EventFilter(TWsEvent *aEvent);
- void s60HandleCommandL(int command);
+ void symbianHandleCommand(int command);
#endif
#if defined(Q_WS_QWS)
virtual bool qwsEventFilter(QWSEvent *);
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index b4658da..7b1817f 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -28,7 +28,7 @@
#endif
#include "private/qwindowsurface_s60_p.h"
#include "qpaintengine.h"
-#include "qmenubar.h"
+#include "private/qmenubar_p.h"
#include "apgwgnam.h" // For CApaWindowGroupName
#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility
@@ -204,7 +204,7 @@ static void mapS60MouseEventTypeToQt(QEvent::Type *type, Qt::MouseButton *button
*type = QEvent::MouseButtonDblClick;
}
- if (*type == QEvent::MouseButtonPress)
+ if (*type == QEvent::MouseButtonPress || *type == QEvent::MouseButtonDblClick)
QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons | (*button);
else if (*type == QEvent::MouseButtonRelease)
QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons &(~(*button));
@@ -313,7 +313,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons
QMouseEvent mEvent(QEvent::MouseButtonPress, alienWidget->mapFrom(qwidget, widgetPos), globalPos,
Qt::RightButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier);
sendMouseEvent(alienWidget, &mEvent);
- m_previousEventLongTap = true;
+ m_previousEventLongTap = false;
}
void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
@@ -342,7 +342,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
TPoint controlScreenPos = PositionRelativeToScreen();
QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos;
- if (type == QEvent::MouseButtonPress)
+ if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick)
{
// get the button press target
alienWidget = qwidget->childAt(widgetPos);
@@ -362,7 +362,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
alienWidget = S60->mousePressTarget;
if (alienWidget != S60->lastPointerEventTarget)
- if (type == QEvent::MouseButtonPress || type == QEvent::MouseMove)
+ if (type == QEvent::MouseButtonPress || QEvent::MouseButtonDblClick || type == QEvent::MouseMove)
{
//moved to another widget, create enter and leave events
if (S60->lastPointerEventTarget)
@@ -524,7 +524,14 @@ TKeyResponse QSymbianControl::sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent)
#ifndef QT_NO_IM
TCoeInputCapabilities QSymbianControl::InputCapabilities() const
{
- QWidget *w = qwidget->focusWidget();
+ QWidget *w = 0;
+
+ if(qwidget->hasFocus()) {
+ w = qwidget;
+ } else {
+ w = qwidget->focusWidget();
+ }
+
QCoeFepInputContext *ic;
if (w && w->isEnabled() && w->testAttribute(Qt::WA_InputMethodEnabled)
&& (ic = qobject_cast<QCoeFepInputContext *>(w->inputContext()))) {
@@ -1031,7 +1038,14 @@ bool QApplication::s60EventFilter(TWsEvent *aEvent)
return false;
}
-void QApplication::s60HandleCommandL(int command)
+/*!
+ Handles commands which are typically handled by CAknAppUi::HandleCommandL()
+ Qts Ui integration into Symbian is partially achieved by deriving from CAknAppUi.
+ Currently, exit, menu and softkey commands are handled
+
+ \sa s60EventFilter(), s60ProcessEvent()
+*/
+void QApplication::symbianHandleCommand(int command)
{
switch (command) {
case EEikCmdExit:
@@ -1041,7 +1055,7 @@ void QApplication::s60HandleCommandL(int command)
break;
default:
// For now assume all unknown menu items are Qt menu items
- QMenuBar::symbianCommands(command);
+ QMenuBarPrivate::symbianCommands(command);
break;
}
}
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 929f987..0e00463 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -139,6 +139,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size,
const QRect centerRect = drawOnlyCenter ? rect : rect.adjusted(cornerWidth, cornerWidth, -cornerWidth, -cornerWidth);
QImage result(size, QImage::Format_ARGB32);
+ result.fill(Qt::transparent);
QPainter painter(&result);
#if 0
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index 1676eb8..bf1c39f 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -184,9 +184,6 @@ protected:
#ifdef Q_OS_WINCE
QAction* wceCommands(uint command);
#endif
-#ifdef Q_OS_SYMBIAN
- void symbianCommands(int command);
-#endif
private Q_SLOTS:
void internalSetSloppyAction();
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index a45f12f..aafc945 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -358,7 +358,6 @@ public:
return 0;
}
} *symbian_menu;
- bool symbianCommands(int command);
#endif
QPointer<QWidget> noReplayFor;
};
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index 86affe3..f181924 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -219,42 +219,18 @@ Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id)
}
}
-void QMenu::symbianCommands(int command)
-{
- Q_D(QMenu);
- d->symbianCommands(command);
-}
-
-void QMenuBar::symbianCommands(int command)
+void QMenuBarPrivate::symbianCommands(int command)
{
int size = nativeMenuBars.size();
for (int i = 0; i < nativeMenuBars.size(); ++i) {
- bool result = nativeMenuBars.at(i)->d_func()->symbianCommands(command);
- if (result)
- return;
- }
-}
-
-bool QMenuBarPrivate::symbianCommands(int command)
-{
SymbianMenuItem* menu = qt_symbian_find_menu_item(command, symbianMenus);
if (!menu)
- return false;
-
- emit q_func()->triggered(menu->action);
- menu->action->activate(QAction::Trigger);
- return true;
-}
-
-bool QMenuPrivate::symbianCommands(int command)
-{
- SymbianMenuItem* menu = qt_symbian_find_menu_item(command, symbianMenus);
- if (!menu)
- return false;
+ continue;
- emit q_func()->triggered(menu->action);
+ emit nativeMenuBars.at(i)->triggered(menu->action);
menu->action->activate(QAction::Trigger);
- return true;
+ break;
+ }
}
void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent)
diff --git a/src/gui/widgets/qmenubar.h b/src/gui/widgets/qmenubar.h
index 36c983b..42f0c0c 100644
--- a/src/gui/widgets/qmenubar.h
+++ b/src/gui/widgets/qmenubar.h
@@ -118,10 +118,6 @@ public:
static void wceRefresh();
#endif
-#ifdef Q_OS_SYMBIAN
- static void symbianCommands(int command);
-#endif
-
public Q_SLOTS:
virtual void setVisible(bool visible);
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index d562cd9..7993acd 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -259,7 +259,7 @@ public:
}
} *symbian_menubar;
- bool symbianCommands(int command);
+ static void symbianCommands(int command);
#endif
};
diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp
index dafbe96..8467aef 100644
--- a/src/s60main/qts60mainappui.cpp
+++ b/src/s60main/qts60mainappui.cpp
@@ -73,7 +73,7 @@ CQtS60MainAppUi::~CQtS60MainAppUi()
void CQtS60MainAppUi::HandleCommandL( TInt aCommand )
{
if (qApp)
- qApp->s60HandleCommandL(aCommand);
+ qApp->symbianHandleCommand(aCommand);
}
void CQtS60MainAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl *control)