From a986d3f4948a782a8df71849464161bc4eff0766 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Thu, 11 Jun 2009 16:28:41 +0200 Subject: Updated example to tell which softkey was pressed --- examples/widgets/softkeys/softkeys.cpp | 24 ++++++++++++++++-------- examples/widgets/softkeys/softkeys.h | 3 +++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index edf38b9..b29be2b 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -3,6 +3,15 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { + central = new QWidget(this); + setCentralWidget(central); + infoLabel = new QLabel(tr("Funky stuff in menu!")); + + layout = new QVBoxLayout; + layout->addWidget(infoLabel); + central->setLayout(layout); + central->setFocusPolicy(Qt::TabFocus); + fileMenu = menuBar()->addMenu(tr("&File")); openDialogAct = new QAction(tr("&Open Dialog"), this); addSoftKeysAct = new QAction(tr("&Add Softkeys"), this); @@ -13,12 +22,6 @@ MainWindow::MainWindow(QWidget *parent) connect(openDialogAct, SIGNAL(triggered()), this, SLOT(openDialog())); connect(addSoftKeysAct, SIGNAL(triggered()), this, SLOT(addSoftKeys())); connect(clearSoftKeysAct, SIGNAL(triggered()), this, SLOT(clearSoftKeys())); - QWidget *central = new QWidget(this); - central->setLayout(new QVBoxLayout); -// central->setFocus(); - setCentralWidget(central); - QPushButton button1; -// QAction* menuAction = } MainWindow::~MainWindow() @@ -43,19 +46,24 @@ void MainWindow::addSoftKeys() QList softkeys; softkeys.append(ok); softkeys.append(cancel); - setSoftKeys(softkeys); + central->setSoftKeys(softkeys); + central->setFocus(); } void MainWindow::clearSoftKeys() { - setSoftKey(0); + central->setSoftKey(0); } void MainWindow::okPressed() { + infoLabel->setText(tr("OK pressed")); + central->setSoftKey(0); } void MainWindow::cancelPressed() { + infoLabel->setText(tr("Cancel pressed")); + central->setSoftKey(0); } diff --git a/examples/widgets/softkeys/softkeys.h b/examples/widgets/softkeys/softkeys.h index 2bc74ba..11db419 100644 --- a/examples/widgets/softkeys/softkeys.h +++ b/examples/widgets/softkeys/softkeys.h @@ -59,6 +59,9 @@ public: MainWindow(QWidget *parent = 0); ~MainWindow(); private: + QVBoxLayout *layout; + QWidget *central; + QLabel *infoLabel; QMenu* fileMenu; QAction* openDialogAct; QAction* addSoftKeysAct; -- cgit v0.12 From a28afcd379faa0c7af2bec23aef8d4023623e616 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 11 Jun 2009 18:23:13 +0200 Subject: Initialize softKeyRole in the constructor. Reviewed-by: Alessandro Portale --- src/gui/kernel/qaction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 8263cbc..b1db8d6 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -81,7 +81,8 @@ static QString qt_strippedText(QString s) QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0), visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false), - menuRole(QAction::TextHeuristicRole), iconVisibleInMenu(-1) + menuRole(QAction::TextHeuristicRole), softKeyRole(QAction::OptionsSoftKey), + iconVisibleInMenu(-1) { #ifdef QT3_SUPPORT static int qt_static_action_id = -1; -- cgit v0.12 From 8a0aa903bcb32a51304557e0e724478aca140233 Mon Sep 17 00:00:00 2001 From: Espen Riskedal Date: Thu, 11 Jun 2009 18:46:16 +0200 Subject: add correct license headers --- examples/widgets/softkeys/main.cpp | 36 ++++++++++++++++++++++--- examples/widgets/softkeys/softkeys.cpp | 41 +++++++++++++++++++++++++++++ src/corelib/tools/qscopedpointer.cpp | 34 ++++++++++++++++++++++-- src/gui/widgets/qactiontokeyeventmapper_p.h | 13 ++++++++- 4 files changed, 118 insertions(+), 6 deletions(-) diff --git a/examples/widgets/softkeys/main.cpp b/examples/widgets/softkeys/main.cpp index a355f93..a544b28 100644 --- a/examples/widgets/softkeys/main.cpp +++ b/examples/widgets/softkeys/main.cpp @@ -1,11 +1,41 @@ /**************************************************************************** ** -** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** -** This file is part of the $MODULE$ of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** -** $TROLLTECH_DUAL_LICENSE$ +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index b29be2b..87d11c9 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "softkeys.h" MainWindow::MainWindow(QWidget *parent) diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index f34aec8..0239575 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -3,9 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** -** This file is part of the $MODULE$ of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** -** $TROLLTECH_DUAL_LICENSE$ +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/gui/widgets/qactiontokeyeventmapper_p.h b/src/gui/widgets/qactiontokeyeventmapper_p.h index da336e8..c54e612 100644 --- a/src/gui/widgets/qactiontokeyeventmapper_p.h +++ b/src/gui/widgets/qactiontokeyeventmapper_p.h @@ -42,6 +42,17 @@ #ifndef QACTIONTOKEYEVENTMAPPER_P_H #define QACTIONTOKEYEVENTMAPPER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "QtGui/qaction.h" QT_BEGIN_HEADER @@ -67,4 +78,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif //QACTIONTOKEYEVENTMAPPER_H +#endif //QACTIONTOKEYEVENTMAPPER_P_H -- cgit v0.12 From 213b58ec4401170813801a26708c87032196a5d9 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 11 Jun 2009 18:49:23 +0200 Subject: Using QPixmap as paint device. Makes more sense in this case. At least on X11 and MacOS. Reviewed-by: Ariya Hidayat --- src/gui/styles/qs60style_simulated.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 362e29c..684f232 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -274,7 +274,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, const QRect leftRect = rightRect.translated(cornerWidth - rectWidth, 0); const QRect centerRect = drawOnlyCenter ? rect : rect.adjusted(cornerWidth, cornerWidth, -cornerWidth, -cornerWidth); - QImage result(size, QImage::Format_ARGB32); + QPixmap result(size); result.fill(Qt::transparent); QPainter painter(&result); @@ -303,7 +303,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, drawPart(center, &painter, centerRect, flags); #endif - return QPixmap::fromImage(result); + return result; } void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value) -- cgit v0.12 From 17f4de60fb4e13e470ae2101460174b41e828e1f Mon Sep 17 00:00:00 2001 From: Espen Riskedal Date: Thu, 11 Jun 2009 19:44:44 +0200 Subject: start on changes file for Tower release --- dist/changes-4.5.2-tower | 101 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 dist/changes-4.5.2-tower diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower new file mode 100644 index 0000000..1a039ba --- /dev/null +++ b/dist/changes-4.5.2-tower @@ -0,0 +1,101 @@ +Qt 4.5.2-tower +--------------- + +The Qt for S60 "Tower" release is the fifth pre-release from the Qt for +S60 porting project. "Tower" is based on the Qt 4.5 codebase. + +Up to and including SHA: not yet started :D + +Lists just S60 fixes, for general 4.5.0 changes go to: + + http://www.qtsoftware.com/developer/changes/changes-4.5.0 + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Task Tracker: + + http://qtsoftware.com/developer/task-tracker + +Each of these identifiers can be entered in the task tracker to obtain +more information about a particular change. Sometimes the task is internal +and cannot be viewed by the public, a lot of them are non-public for Qt for +S60 at the moment. + +**************************************************************************** +* New features * +**************************************************************************** + +New modules +----------- + +- QtSql + * todo +- QtWebkit + * todo +- Phonon + * todo + + +New classes +------------ + +- todo + * todo + +Ported classes +-------------- + +- todo + * todo + +Features +-------- + +- todo + * todo + +Optimizations +------------- + +- todo + * todo + +**************************************************************************** +* Build issues * +**************************************************************************** + +- todo + +**************************************************************************** +* Changes to existing classes * +**************************************************************************** + +- todo + * todo + +**************************************************************************** +* Examples and demos * +**************************************************************************** + +- todo + * todo + +**************************************************************************** +* Tools * +**************************************************************************** + +- todo + * todo + +**************************************************************************** +* Plugins * +**************************************************************************** + +- todo + * todo + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + +- todo + * todo -- cgit v0.12 From 09e3e740adfc08723275c8c7d9860d37fc61d8dd Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 3 Jun 2009 11:48:02 +1000 Subject: Fixed recursive QMAKE_EXTRA_TARGETS not being generated correctly for SUBDIRS projects when using abld. Acked-by: Miikka Heikkinen --- qmake/generators/makefile.cpp | 101 +++++++++++++++++------------- qmake/generators/makefile.h | 3 + qmake/generators/symbian/symmake_abld.cpp | 12 +++- 3 files changed, 70 insertions(+), 46 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 82703c5..5f38bc7 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2234,8 +2234,8 @@ MakefileGenerator::writeHeader(QTextStream &t) t << endl; } -void -MakefileGenerator::writeSubDirs(QTextStream &t) +QList +MakefileGenerator::findSubDirsSubTargets() const { QList targets; { @@ -2332,6 +2332,13 @@ MakefileGenerator::writeSubDirs(QTextStream &t) } } } + return targets; +} + +void +MakefileGenerator::writeSubDirs(QTextStream &t) +{ + QList targets = findSubDirsSubTargets(); t << "first: make_default" << endl; int flags = SubTargetInstalls; if(project->isActiveConfig("ordered")) @@ -2348,39 +2355,43 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListtarget; + t << endl << endl; + } writeExtraVariables(t); - t << "SUBTARGETS = "; // subtargets are sub-directory - for(int target = 0; target < targets.size(); ++target) - t << " \\\n\t\t" << targets.at(target)->target; - t << endl << endl; QStringList targetSuffixes; const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); - targetSuffixes << "make_default" << "make_first" << "all" << "clean" << "distclean" - << QString((flags & SubTargetInstalls) ? "install_subtargets" : "install") - << QString((flags & SubTargetInstalls) ? "uninstall_subtargets" : "uninstall"); + if (!(flags & SubTargetSkipDefaultTargets)) { + targetSuffixes << "make_default" << "make_first" << "all" << "clean" << "distclean" + << QString((flags & SubTargetInstalls) ? "install_subtargets" : "install") + << QString((flags & SubTargetInstalls) ? "uninstall_subtargets" : "uninstall"); + } // generate target rules for(int target = 0; target < targets.size(); ++target) { @@ -2500,23 +2511,25 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListvalues("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) - project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); + if (!(flags & SubTargetSkipDefaultTargets)) { + if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) + project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); - writeMakeQmake(t); + writeMakeQmake(t); - t << "qmake_all:"; - if(!targets.isEmpty()) { - for(QList::Iterator it = targets.begin(); it != targets.end(); ++it) { - if(!(*it)->profile.isEmpty()) - t << " " << (*it)->target << "-" << "qmake_all"; + t << "qmake_all:"; + if(!targets.isEmpty()) { + for(QList::Iterator it = targets.begin(); it != targets.end(); ++it) { + if(!(*it)->profile.isEmpty()) + t << " " << (*it)->target << "-" << "qmake_all"; + } } + if(project->isEmpty("QMAKE_NOFORCE")) + t << " FORCE"; + if(project->isActiveConfig("no_empty_targets")) + t << "\n\t" << "@cd ."; + t << endl << endl; } - if(project->isEmpty("QMAKE_NOFORCE")) - t << " FORCE"; - if(project->isActiveConfig("no_empty_targets")) - t << "\n\t" << "@cd ."; - t << endl << endl; for(int s = 0; s < targetSuffixes.size(); ++s) { QString suffix = targetSuffixes.at(s); diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 9896c1d..a6eec52 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -121,9 +121,12 @@ protected: enum SubTargetFlags { SubTargetInstalls=0x01, SubTargetOrdered=0x02, + SubTargetSkipDefaultVariables=0x04, + SubTargetSkipDefaultTargets=0x08, SubTargetsNoFlags=0x00 }; + QList findSubDirsSubTargets() const; void writeSubTargets(QTextStream &t, QList subtargets, int flags); //extra compiler interface diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 32d08f6..8501224 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -184,6 +184,10 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "#" << endl; t << "# ==============================================================================" << "\n" << endl; t << endl; + QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); + if(ofile.lastIndexOf(Option::dir_sep) != -1) + ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) -1); + t << "MAKEFILE = " << ofile << endl; t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; @@ -273,8 +277,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool } - writeExtraTargets(t); - // pre_targetdeps target depends on: // - all targets specified in PRE_TARGETDEPS // - the GENERATED_SOURCES sources (so that they get generated) @@ -285,6 +287,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool // so supporting generating sources is the best we can do. This is enough for mocs. if (!isSubdirs) { + writeExtraTargets(t); writeExtraCompilerTargets(t); t << CREATE_TEMPS_TARGET ":" << endl; @@ -345,6 +348,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool } t << endl; } + else { + QList subtargets = findSubDirsSubTargets(); + writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables|SubTargetSkipDefaultTargets); + qDeleteAll(subtargets); + } writeDeploymentTargets(t); -- cgit v0.12 From 9598176349d070966fa84eeb8c77b23d0c9644af Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 9 Jun 2009 09:32:50 +1000 Subject: Fixed recursive QMAKE_EXTRA_TARGETS not being generated correctly for SUBDIRS projects when using sbsv2. Acked-by: Miikka Heikkinen --- qmake/generators/symbian/symmake_sbsv2.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 33431d2..7b739c7 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -124,6 +124,10 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "#" << endl; t << "# ==============================================================================" << "\n" << endl; t << endl; + QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); + if(ofile.lastIndexOf(Option::dir_sep) != -1) + ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) -1); + t << "MAKEFILE = " << ofile << endl; t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; @@ -206,11 +210,15 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo // Add all extra targets including extra compiler targest also to wrapper makefile, // even though many of them may have already been added to bld.inf as FLMs. // This is to enable use of targets like 'mocables', which call targets generated by extra compilers. - t << extraTargetsCache; - if (!isSubdirs) { + t << extraTargetsCache; t << extraCompilersCache; } + else { + QList subtargets = findSubDirsSubTargets(); + writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables|SubTargetSkipDefaultTargets); + qDeleteAll(subtargets); + } t << "dodistclean:" << endl; foreach(QString item, project->values("SUBDIRS")) { -- cgit v0.12 From f0044749d5e9905e2f7af9c0aa54e4d77cab13af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Fri, 12 Jun 2009 09:12:07 +0300 Subject: S60Style: Remove key accelerators --- src/gui/styles/qs60style.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 0d003a6..4ba5351 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2314,6 +2314,8 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_BlinkCursorWhenTextSelected: retValue = true; break; + case SH_UnderlineShortcut: + retValue = 0; default: break; } -- cgit v0.12 From e0690577327097ec3d9be99205bfcf01f8404d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Fri, 12 Jun 2009 10:36:42 +0300 Subject: S60Style: Drivelist combobox in AddressBook example causes crash due to null pointer use in S60Style. --- src/gui/styles/qs60style.cpp | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 4ba5351..83f1698 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -574,7 +574,7 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start, if (startRect.topRight().y() > endRect.bottomLeft().y()) { const int overlap = (startRect.topRight().y() - endRect.bottomLeft().y())>>1; startRect.setHeight(startRect.height()-overlap); - endRect.adjust(0,overlap,0,0); + endRect.adjust(0,overlap,0,0); } } @@ -1129,7 +1129,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom copy.state |= State_Raised; copy.state &= ~State_Sunken; } - pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ? + pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ? PE_IndicatorSpinPlus : PE_IndicatorSpinUp; @@ -1156,7 +1156,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom copy.state |= State_Raised; copy.state &= ~State_Sunken; } - pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ? + pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ? PE_IndicatorSpinMinus : PE_IndicatorSpinDown; @@ -1586,12 +1586,12 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QPixmap tabIcon = optionTab.icon.pixmap(iconSize, (optionTab.state & State_Enabled) ? QIcon::Normal : QIcon::Disabled); if (tab->text.isEmpty()) - painter->drawPixmap(tr.center().x() - (tabIcon.height() >>1), - tr.center().y() - (tabIcon.height() >>1), + painter->drawPixmap(tr.center().x() - (tabIcon.height() >>1), + tr.center().y() - (tabIcon.height() >>1), tabIcon); else - painter->drawPixmap(tr.left() + tabOverlap, - tr.center().y() - (tabIcon.height() >>1), + painter->drawPixmap(tr.left() + tabOverlap, + tr.center().y() - (tabIcon.height() >>1), tabIcon); tr.setLeft(tr.left() + iconSize.width() + 4); } @@ -1822,7 +1822,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } } QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, mtyRect, adjFlags); - + QRegion clipRegion = painter->clipRegion(); painter->setClipRect(option->rect); drawControl(CE_HeaderSection, header, painter, widget); @@ -2038,8 +2038,18 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_SPINBOX case PE_FrameFocusRect: // Calendar widget and combox both do not use styled itemDelegate - if (!(widget && qobject_cast(widget->parent())) || - qobject_cast(widget)) { + if ( widget && ( +#ifndef QT_NO_CALENDARWIDGET + (qobject_cast(widget->parent())) +#else + false +#endif //QT_NO_CALENDARWIDGET +#ifndef QT_NO_COMBOBOX + || (qobject_cast(widget)) +#else + || false +#endif //QT_NO_COMBOBOX + )) { // no focus selection for touch if (option->state & State_HasFocus && !QS60StylePrivate::isTouchSupported()) { painter->save(); @@ -2292,9 +2302,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w retValue = true; break; case SH_ProgressDialog_TextLabelAlignment: - retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ? + retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ? Qt::AlignLeft : - Qt::AlignRight; + Qt::AlignRight; break; case SH_Menu_SubMenuPopupDelay: retValue = 300; @@ -2408,7 +2418,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple const int y = frameThickness + spinbox->rect.y(); const int x = spinbox->rect.x() + spinbox->rect.width() - frameThickness - 2*buttonSize.width(); - + switch (scontrol) { case SC_SpinBoxUp: if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) @@ -2643,7 +2653,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con // a) highlight border does not cross the rect // b) in s60 list checkbox is smaller than normal checkbox //todo; magic three - ret.setRect(opt->rect.left()+3, opt->rect.top() + heightOffset, + ret.setRect(opt->rect.left()+3, opt->rect.top() + heightOffset, indicatorWidth-3, indicatorHeight-3); } else { ret.setRect(opt->rect.right() - indicatorWidth - spacing, opt->rect.top() + heightOffset, @@ -2782,8 +2792,8 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, QS60StyleEnums::SkinParts part; QS60StylePrivate::SkinElementFlags adjustedFlags; if (option) - adjustedFlags = (option->state & State_Enabled) ? - QS60StylePrivate::SF_StateEnabled : + adjustedFlags = (option->state & State_Enabled) ? + QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; switch(standardIcon) { -- cgit v0.12 From 915e8a40866d0e86bcaaf3d72d26897bebf00a41 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 12 Jun 2009 11:03:55 +0300 Subject: Fixes FEP crash when changing the focused Qt widget to NULL. --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index b183e1b..7d79422 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -329,6 +329,8 @@ void QCoeFepInputContext::updateHints() m_lastImHints = hints; applyHints(hints); } + } else { + CCoeEnv::Static()->InputCapabilitiesChanged(); } } -- cgit v0.12 From bccd5442f24ce18e08ec5a5e78ccc6566f4e0463 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 12 Jun 2009 11:27:50 +0300 Subject: More robust handling for stdapis paths --- mkspecs/common/symbian/symbian.conf | 3 --- mkspecs/features/symbian/platform_paths.prf | 41 +++++++++++++++++++---------- mkspecs/features/symbian/stl.prf | 3 +-- src/network/ssl/ssl.pri | 6 +---- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 6ae4c4a..663a1df 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -115,10 +115,7 @@ INCLUDEPATH = \ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \ $${EPOCROOT}epoc32/include \ - $${EPOCROOT}epoc32/include/stdapis \ - $${EPOCROOT}epoc32/include/stdapis/sys \ $$OS_LAYER_LIBC_SYSTEMINCLUDE \ - $${OS_LAYER_LIBC_SYSTEMINCLUDE}/sys \ $$INCLUDEPATH # Supports S60 3.0, 3.1, 3.2 and 5.0 by default diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf index c9972cc..419982d 100644 --- a/mkspecs/features/symbian/platform_paths.prf +++ b/mkspecs/features/symbian/platform_paths.prf @@ -205,16 +205,17 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) { # part of stdapis. Append to INCLUDEPATH in pro-file. # --------------------------------------- - OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) + OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \ + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sys) OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \ $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \ $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) - OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) - exists($$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)) { + # stlportv5 is preferred over stlport as it has the throwing version of operator new + exists($${EPOCROOT}$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)) { OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) } else { OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) @@ -408,28 +409,40 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) { # part of stdapis. Append to INCLUDEPATH in pro-file. # --------------------------------------- - OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) + OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \ + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sys) \ + /epoc32/include/stdapis \ + /epoc32/include/stdapis/sys OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \ $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \ - $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) \ + /epoc32/include/stdapis/glib-2.0 \ + /epoc32/include/stdapis/glib-2.0/glib \ + /epoc32/include/stdapis/glib-2.0/gObject - - OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) + OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) \ + /epoc32/include/stdapis/openssl # stlportv5 is preferred over stlport as it has the throwing version of operator new - exists($$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)) { - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) + exists($${EPOCROOT}$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5))|exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) { + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \ + /epoc32/include/stdapis/stlportv5 } else { - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \ + /epoc32/include/stdapis/stlport } - - OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) + + OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) \ + /epoc32/include/stdapis/boost OS_LAYER_DBUS_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \ - $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) \ + /epoc32/include/stdapis/dbus-1.0 \ + /epoc32/include/stdapis/dbus-1.0/dbus - OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) + OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) \ + /epoc32/include/stdapis/utility # --------------------------------------- # Definitions to export IBY files to different folders where they will be taken diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf index f01cc18..9eb6b86 100644 --- a/mkspecs/features/symbian/stl.prf +++ b/mkspecs/features/symbian/stl.prf @@ -9,8 +9,7 @@ DEFINES *= $$STLLIB_USAGE_DEFINES # Legacy support requires some hardcoded stdapis paths. # Note: Also the new header is used from STL when it is enabled -INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE \ - $${EPOCROOT}epoc32/include/stdapis/stlport +INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE # Remove mkspecs/common/symbian/stl-off from beginning of includepath # in order to use new and delete operators from STL diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 5427370..6021d5d 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -3,11 +3,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) { symbian { - TRY_INCLUDEPATHS = $${EPOCROOT}epoc32/include $${EPOCROOT}epoc32/include/stdapis $${EPOCROOT}epoc32/include/stdapis/sys $$OS_LAYER_LIBC_SYSTEMINCLUDE - for(p, TRY_INCLUDEPATHS) { - pp = $$join(p, "", "", "/openssl") - exists($$pp):INCLUDEPATH *= $$pp - } + INCLUDEPATH *= $$OS_LAYER_SSL_SYSTEMINCLUDE } else { include($$QT_SOURCE_TREE/config.tests/unix/openssl/openssl.pri) } -- cgit v0.12 From 97b5a40c5228aff51f7ce63c243bedcf1fc82452 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 12 Jun 2009 12:52:58 +0300 Subject: Fixed layout when orientation changed via AknAppUi::SetOrientationL. Task: 252798 --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index b33fe19..1347c06 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1088,6 +1088,9 @@ void QApplication::symbianResourceChange(int type) switch (type) { case KEikDynamicLayoutVariantSwitch: { + if (S60) + S60->updateScreenSize(); + #ifndef QT_NO_STYLE_S60 QS60Style *s60Style = 0; -- cgit v0.12 From 2a7d22330226c0a1ef6bb5c35f07241a05429913 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Fri, 12 Jun 2009 14:09:37 +0200 Subject: bug fix for doubleclick event for symbian --- src/gui/kernel/qapplication_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 1347c06..4c008fb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -392,7 +392,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) alienWidget = S60->mousePressTarget; if (alienWidget != S60->lastPointerEventTarget) - if (type == QEvent::MouseButtonPress || QEvent::MouseButtonDblClick || type == QEvent::MouseMove) + if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick || type == QEvent::MouseMove) { //moved to another widget, create enter and leave events if (S60->lastPointerEventTarget) -- cgit v0.12 From 32bd7c09327f0234ac5415d029d76aa3bab1feaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Fri, 12 Jun 2009 17:38:20 +0300 Subject: S60Style: Itemview active icons are rendered as disabled and vice versa. --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 83f1698..c6118d6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1387,7 +1387,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags); // draw the icon - const QIcon::Mode mode = !(voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled; + const QIcon::Mode mode = (voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled; const QIcon::State state = voptAdj.state & QStyle::State_Open ? QIcon::On : QIcon::Off; voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state); -- cgit v0.12