summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-05 09:21:16 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-05 09:21:16 (GMT)
commita21a23c4f5d9d244f45568020e499b6084a7d9fe (patch)
tree3f943a3cb4dc370a57d24e481226c02c6dc7bd62
parentc5845e6ea9cafea836038e24e6072aaed8242ef1 (diff)
parent4e7ab98ebd48cc1d5fa7643290e34ee166b9ab03 (diff)
downloadQt-a21a23c4f5d9d244f45568020e499b6084a7d9fe.zip
Qt-a21a23c4f5d9d244f45568020e499b6084a7d9fe.tar.gz
Qt-a21a23c4f5d9d244f45568020e499b6084a7d9fe.tar.bz2
Merge branch 'softkeys' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into softkeys
Conflicts: src/gui/kernel/qapplication_s60.cpp
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro4
-rw-r--r--examples/xml/saxbookmarks/frankf.xbel230
-rw-r--r--examples/xml/saxbookmarks/jenniferf.xbel93
-rw-r--r--qmake/generators/symbian/symmake.cpp5
-rw-r--r--qmake/qmake.pri7
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/text/qfontengine_s60.cpp27
-rw-r--r--src/gui/widgets/qmenu.cpp16
8 files changed, 33 insertions, 351 deletions
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index ed2530c..9c08801 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -127,8 +127,8 @@ symbian {
desktopservices_images.sources = $$PWD/../desktopservices/data/*.png
desktopservices_images.path = /data/images
- saxbookmarks.sources = $$PWD/../../../examples/xml/saxbookmarks/frankf.xbel
- saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jenniferf.xbel
+ saxbookmarks.sources = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
+ saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
saxbookmarks.path = /data/qt/saxbookmarks
DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \
diff --git a/examples/xml/saxbookmarks/frankf.xbel b/examples/xml/saxbookmarks/frankf.xbel
deleted file mode 100644
index 07a9463..0000000
--- a/examples/xml/saxbookmarks/frankf.xbel
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xbel>
-<xbel version="1.0">
- <folder folded="yes">
- <title>Literate Programming</title>
- <bookmark href="http://www.vivtek.com/litprog.html">
- <title>Synopsis of Literate Programming</title>
- </bookmark>
- <bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
- <title>Literate Programming: Propaganda and Tools</title>
- </bookmark>
- <bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
- <title>Literate Programming by Henrik Turbell</title>
- </bookmark>
- <bookmark href="http://www.desy.de/user/projects/LitProg.html">
- <title>Literate Programming Library</title>
- </bookmark>
- <bookmark href="http://www.loria.fr/services/tex/english/litte.html">
- <title>Literate Programming Basics</title>
- </bookmark>
- <bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
- <title>Literate Programming Overview</title>
- </bookmark>
- <bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
- <title>POD is not Literate Programming</title>
- </bookmark>
- <bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
- <title>Computers That We Can Count On</title>
- </bookmark>
- <bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
- <title>Literate Programming - Issues and Problems</title>
- </bookmark>
- <bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
- <title>Literate Programming - Wiki Pages</title>
- </bookmark>
- <bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
- <title>What is well-commented code?</title>
- </bookmark>
- <bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
- <title>Bibliography on literate programming - A searchable bibliography</title>
- </bookmark>
- <bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
- <title>Program comprehension and code reading bibliography</title>
- </bookmark>
- <bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
- <title>Elucidative Programming</title>
- </bookmark>
- <bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
- <title>AVL Trees (TexiWeb)</title>
- </bookmark>
- <bookmark href="http://literate-programming.wikiverse.org/">
- <title>Literate Programming on Wikiverse</title>
- </bookmark>
- <bookmark href="http://www.pbrt.org/">
- <title>Physically Based Rendering: From Theory to Implementation</title>
- </bookmark>
- </folder>
- <folder folded="no">
- <title>Useful C++ Links</title>
- <folder folded="no">
- <title>STL</title>
- <bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
- <title>STL Reference Documentation</title>
- </bookmark>
- <bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
- <title>STL Tutorial</title>
- </bookmark>
- <bookmark href="http://www.cppreference.com/cpp_stl.html">
- <title>STL Reference</title>
- </bookmark>
- </folder>
- <folder folded="no">
- <title>Qt</title>
- <bookmark href="http://doc.trolltech.com/2.3/">
- <title>Qt 2.3 Reference</title>
- </bookmark>
- <bookmark href="http://doc.trolltech.com/3.3/">
- <title>Qt 3.3 Reference</title>
- </bookmark>
- <bookmark href="http://doc.trolltech.com/4.0/">
- <title>Qt 4.0 Reference</title>
- </bookmark>
- <bookmark href="http://www.trolltech.com/">
- <title>Trolltech Home Page</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>IOStreams</title>
- <bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
- <title>IO Stream Library</title>
- </bookmark>
- <bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
- <title>Binary I/O</title>
- </bookmark>
- <bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
- <title>I/O Stream FAQ</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>gdb</title>
- <bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
- <title>GDB Tutorial</title>
- </bookmark>
- <bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
- <title>Debugging with GDB</title>
- </bookmark>
- <bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
- <title>GDB Quick Reference Page (PDF) (Handy)</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>Classes and Constructors</title>
- <bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
- <title>Constructor FAQ</title>
- </bookmark>
- <bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
- <title>Organizing Classes</title>
- </bookmark>
- </folder>
- </folder>
- <folder folded="yes">
- <title>Software Documentation or System Documentation</title>
- <bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
- <title>The Almighty Thud</title>
- </bookmark>
- <bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
- <title>Microsoft Coding Techniques and Programming Practices</title>
- </bookmark>
- <bookmark href="http://www.bearcave.com/software/prog_docs.html">
- <title>Software and Documentation</title>
- </bookmark>
- <bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
- <title>The Source Code is the Design</title>
- </bookmark>
- <bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
- <title>What is Software Design?</title>
- </bookmark>
- <bookmark href="http://www.mindprod.com/unmain.html">
- <title>How To Write Unmaintainable Code</title>
- </bookmark>
- <bookmark href="http://www.idinews.com/selfDoc.html">
- <title>Self Documenting Program Code Remains a Distant Goal</title>
- </bookmark>
- <bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
- <title>Place Tab A in Slot B</title>
- </bookmark>
- <bookmark href="http://www.holub.com/class/uml/uml.html">
- <title>UML Reference Card</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>TeX Resources</title>
- <bookmark href="http://www.tug.org/">
- <title>The TeX User's Group</title>
- </bookmark>
- <bookmark href="http://www.miktex.org/">
- <title>MikTeX website</title>
- </bookmark>
- <bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
- <title>MetaPost website</title>
- </bookmark>
- <bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
- <title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
- </bookmark>
- </folder>
- <folder folded="no">
- <title>Portable Document Format (PDF)</title>
- <bookmark href="http://www.adobe.com/">
- <title>Adobe - The postscript and PDF standards</title>
- </bookmark>
- <bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
- <title>Reference Manual Portable Document Format</title>
- </bookmark>
- <bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
- <title>Adobe Acrobat Software Development Kit</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>Literature Sites</title>
- <bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
- <title>Guide to Special Collections (Columbia University)</title>
- </bookmark>
- <bookmark href="http://www.ipl.org/ref/litcrit/">
- <title>Literary Criticism on the Web from the Internet Public Library</title>
- </bookmark>
- <bookmark href="http://www.victorianweb.org/">
- <title>Victorian Web.</title>
- </bookmark>
- <bookmark href="http://vos.ucsb.edu/">
- <title>Voice of the Shuttle.</title>
- </bookmark>
- <bookmark href="http://www.modjourn.brown.edu/">
- <title>Modernist Journals Project</title>
- </bookmark>
- <bookmark href="http://www.poetspath.com">
- <title>Museum of American Poetics</title>
- </bookmark>
- <bookmark href="http://www.english.uiuc.edu/maps/">
- <title>Modern American Poetry</title>
- </bookmark>
- <bookmark href="http://www.findarticles.com/">
- <title>FindArticles.com</title>
- </bookmark>
- <bookmark href="http://www.literaryhistory.com">
- <title>Literary History</title>
- </bookmark>
- <bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
- <title>Literary Encyclopedia</title>
- </bookmark>
- <separator/>
- <bookmark href="http://texts.cdlib.org/ucpress/">
- <title>The University of California Press</title>
- </bookmark>
- <bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
- <title>Wright American Fiction, 1851-1875</title>
- </bookmark>
- <bookmark href="http://docsouth.unc.edu/">
- <title>Documenting the American South: Beginnings to 1920</title>
- </bookmark>
- <bookmark href="http://etext.lib.virginia.edu/eng-on.html">
- <title>Electronic Text Center at the University of Virginia</title>
- </bookmark>
- <bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
- <title>The Schomburg Center for Research in Black Culture</title>
- </bookmark>
- <bookmark href="http://www.infomotions.com/alex2/">
- <title>Alex Catalogue of Electronic Texts.</title>
- </bookmark>
- </folder>
-</xbel>
diff --git a/examples/xml/saxbookmarks/jenniferf.xbel b/examples/xml/saxbookmarks/jenniferf.xbel
deleted file mode 100644
index 1f7810b..0000000
--- a/examples/xml/saxbookmarks/jenniferf.xbel
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xbel>
-<xbel version="1.0">
- <folder folded="no">
- <title>Qt Resources</title>
- <folder folded="yes">
- <title>Trolltech Partners</title>
- <bookmark href="http://partners.trolltech.com/partners/training.html">
- <title>Training Partners</title>
- </bookmark>
- <bookmark href="http://partners.trolltech.com/partners/service.html">
- <title>Consultants and System Integrators</title>
- </bookmark>
- <bookmark href="http://partners.trolltech.com/partners/tech.html">
- <title>Technology Partners</title>
- </bookmark>
- <bookmark href="http://partners.trolltech.com/partners/resellers.html">
- <title>Value Added Resellers (VARs)</title>
- </bookmark>
- </folder>
- <folder folded="yes">
- <title>Community Resources</title>
- <bookmark href="http://www.qtforum.org/">
- <title>QtForum.org</title>
- </bookmark>
- <bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
- <title>The Independent Qt Tutorial</title>
- </bookmark>
- <bookmark href="http://prog.qt.free.fr/">
- <title>French PROG.Qt</title>
- </bookmark>
- <bookmark href="http://www.qtforum.de/">
- <title>German Qt Forum</title>
- </bookmark>
- <bookmark href="http://www.korone.net/">
- <title>Korean Qt Community Site</title>
- </bookmark>
- <bookmark href="http://prog.org.ru/forum/forum_14.html">
- <title>Russian Qt Forum</title>
- </bookmark>
- <bookmark href="http://qt4.digitalfanatics.org/">
- <title>Digitalfanatics: The QT 4 Resource Center</title>
- </bookmark>
- <bookmark href="http://www.qtquestions.org/">
- <title>QtQuestions</title>
- </bookmark>
- </folder>
- <bookmark href="http://doc.trolltech.com/qq/">
- <title>Qt Quarterly</title>
- </bookmark>
- <bookmark href="http://www.trolltech.com/">
- <title>Trolltech's home page</title>
- </bookmark>
- <bookmark href="http://doc.trolltech.com/4.0/">
- <title>Qt 4.0 documentation</title>
- </bookmark>
- <bookmark href="http://www.trolltech.com/developer/faqs/">
- <title>Frequently Asked Questions</title>
- </bookmark>
- </folder>
- <folder folded="no">
- <title>Online Dictionaries</title>
- <bookmark href="http://www.dictionary.com/">
- <title>Dictionary.com</title>
- </bookmark>
- <bookmark href="http://www.m-w.com/">
- <title>Merriam-Webster Online</title>
- </bookmark>
- <bookmark href="http://dictionary.cambridge.org/">
- <title>Cambridge Dictionaries Online</title>
- </bookmark>
- <bookmark href="http://www.onelook.com/">
- <title>OneLook Dictionary Search</title>
- </bookmark>
- <separator/>
- <bookmark href="www.iee.et.tu-dresden.de/">
- <title>The New English-German Dictionary</title>
- </bookmark>
- <bookmark href="http://dict.tu-chemnitz.de/">
- <title>TU Chemnitz German-English Dictionary</title>
- </bookmark>
- <separator/>
- <bookmark href="http://atilf.atilf.fr/tlf.htm">
- <title>Trésor de la Langue Française informatisé</title>
- </bookmark>
- <bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
- <title>Dictionnaire de l'Académie Française</title>
- </bookmark>
- <bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
- <title>Dictionnaire des synonymes</title>
- </bookmark>
- </folder>
-</xbel>
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 8f63cd0..f1e9165 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -835,8 +835,9 @@ bool SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringL
t << "SOURCEPATH\t\t\t. " << endl;
t << "START RESOURCE\t\t" << regTarget << endl;
- t << "DEPENDS " << target << ".rsg" << endl;
- t << "\tTARGETPATH\t\t" REGISTRATION_RESOURCE_DIRECTORY_HW << endl;
+ if (isForSymbianSbsv2())
+ t << "DEPENDS " << target << ".rsg" << endl;
+ t << "TARGETPATH\t\t" REGISTRATION_RESOURCE_DIRECTORY_HW << endl;
t << "END" << endl << endl;
}
return true;
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index b51db32..4e58732 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -9,7 +9,6 @@ DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_STL QT_NO_COMPRESS QT_NO_UNICODET
SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
generators/unix/unixmake2.cpp generators/unix/unixmake.cpp meta.cpp \
option.cpp generators/win32/winmakefile.cpp generators/win32/mingw_make.cpp \
- qpopen.cpp \
generators/makefiledeps.cpp generators/metamakefile.cpp generators/mac/pbuilder_pbx.cpp \
generators/xmloutput.cpp generators/win32/borland_bmake.cpp \
generators/win32/msvc_nmake.cpp generators/projectgenerator.cpp \
@@ -19,6 +18,12 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
generators/symbian/symmake_abld.cpp \
generators/symbian/symmake_sbsv2.cpp \
generators/symbian/initprojectdeploy_symbian.cpp
+
+# MWC does not provide an implementation of popen() so fake it.
+win32-mwc {
+ SOURCES += qpopen.cpp \
+}
+
HEADERS += project.h property.h generators/makefile.h \
generators/unix/unixmake.h meta.h option.h cachekeys.h \
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 87c2fec..94e59b3 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1,5 +1,5 @@
/****************************************************************************
-**
+1**
** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 1408f37..2e1abb2 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -227,27 +227,14 @@ QImage QFontEngineS60::alphaMapForGlyph(glyph_t glyph)
glyph_metrics_t QFontEngineS60::boundingBox(const QGlyphLayout &glyphs)
{
- glyph_metrics_t overall;
- // initialize with line height, we get the same behaviour on all platforms
- overall.y = -ascent();
- overall.height = ascent() + descent() + 1;
-
- QFixed ymax = 0;
- QFixed xmax = 0;
- for (int i = 0; i < glyphs.numGlyphs; i++) {
- const glyph_metrics_t glyphBounds = boundingBox_const(glyphs.glyphs[i]);
- QFixed x = overall.xoff + glyphs.offsets[i].x + glyphBounds.x;
- QFixed y = overall.yoff + glyphs.offsets[i].y - glyphBounds.y;
- overall.x = qMin(overall.x, x);
- overall.y = qMin(overall.y, y);
- xmax = qMax(xmax, x + glyphBounds.width);
- ymax = qMax(ymax, y + glyphBounds.height);
- overall.xoff += glyphBounds.xoff;
- }
- overall.height = qMax(overall.height, ymax - overall.y);
- overall.width = xmax - overall.x;
+ if (glyphs.numGlyphs == 0)
+ return glyph_metrics_t();
+
+ QFixed w = 0;
+ for (int i = 0; i < glyphs.numGlyphs; ++i)
+ w += glyphs.effectiveAdvance(i);
- return overall;
+ return glyph_metrics_t(0, -ascent(), w, ascent()+descent()+1, w, 0);
}
glyph_metrics_t QFontEngineS60::boundingBox_const(glyph_t glyph) const
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 6be0f19..c4db539 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -60,6 +60,9 @@
#ifndef QT_NO_WHATSTHIS
# include <qwhatsthis.h>
#endif
+#ifdef QT_KEYPAD_NAVIGATION
+# include <private/qsoftkeystack_p.h>
+#endif
#include "qmenu_p.h"
#include "qmenubar_p.h"
@@ -578,8 +581,14 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
//when the action has no QWidget, the QMenu itself should
// get the focus
// Since the menu is a pop-up, it uses the popup reason.
- if (!q->hasFocus())
+ if (!q->hasFocus()) {
q->setFocus(Qt::PopupFocusReason);
+#ifdef QT_KEYPAD_NAVIGATION
+ // TODO: aportale, remove KEYPAD_NAVIGATION_HACK when softkey stack
+ // handles focus related and user related actions separately...
+ QKeyEventSoftKey::addSoftKey(QSoftKeyAction::Cancel, Qt::Key_Back, q);
+#endif
+ }
}
}
} else { //action is a separator
@@ -1937,6 +1946,9 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
#ifndef QT_NO_ACCESSIBILITY
QAccessible::updateAccessibility(this, 0, QAccessible::PopupMenuStart);
#endif
+#ifdef QT_KEYPAD_NAVIGATION
+ QKeyEventSoftKey::addSoftKey(QSoftKeyAction::Cancel, Qt::Key_Back, this);
+#endif
}
/*!
@@ -2587,7 +2599,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
case Qt::Key_Escape:
#ifdef QT_KEYPAD_NAVIGATION
case Qt::Key_Back:
- case Qt::Key_Context2: // TODO: aportale, remove KEYPAD_NAVIGATION_HACK when softkey support is there
+ QKeyEventSoftKey::removeSoftkey(this);
#endif
key_consumed = true;
if (d->tornoff) {