/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation 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 Technology Preview License Agreement accompanying ** this package. ** ** 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.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! \group statemachine \title State Machine Classes */ /*! \page statemachine-api.html \title The State Machine Framework \brief An overview of the State Machine framework for constructing and executing state graphs. \ingroup frameworks-technologies \tableofcontents The State Machine framework provides classes for creating and executing state graphs. The concepts and notation are based on those from Harel's \l{Statecharts: A visual formalism for complex systems}{Statecharts}, which is also the basis of UML state diagrams. The semantics of state machine execution are based on \l{State Chart XML: State Machine Notation for Control Abstraction}{State Chart XML (SCXML)}. Statecharts provide a graphical way of modeling how a system reacts to stimuli. This is done by defining the possible \e states that the system can be in, and how the system can move from one state to another (\e transitions between states). A key characteristic of event-driven systems (such as Qt applications) is that behavior often depends not only on the last or current event, but also the events that preceded it. With statecharts, this information is easy to express. The State Machine framework provides an API and execution model that can be used to effectively embed the elements and semantics of statecharts in Qt applications. The framework integrates tightly with Qt's meta-object system; for example, transitions between states can be triggered by signals, and states can be configured to set properties and invoke methods on QObjects. Qt's event system is used to drive the state machines. The state graph in the State Machine framework is hierarchical. States can be nested inside of other states, and the current configuration of the state machine consists of the set of states which are currently active. All the states in a valid configuration of the state machine will have a common ancestor. \section1 Classes in the State Machine Framework These classes are provided by qt for creating event-driven state machines. \annotatedlist statemachine \section1 A Simple State Machine To demonstrate the core functionality of the State Machine API, let's look at a small example: A state machine with three states, \c s1, \c s2 and \c s3. The state machine is controlled by a single QPushButton; when the button is clicked, the machine transitions to another state. Initially, the state machine is in state \c s1. The statechart for this machine is as follows: \img statemachine-button.png \omit \caption This is a caption \endomit The following snippet shows the code needed to create such a state machine. First, we create the state machine and states: \snippet doc/src/snippets/statemachine/main.cpp 0 Then, we create the transitions by using the QState::addTransition() function: \snippet doc/src/snippets/statemachine/main.cpp 1 Next, we add the states to the machine and set the machine's initial state: \snippet doc/src/snippets/statemachine/main.cpp 2 Finally, we start the state machine: \snippet doc/src/snippets/statemachine/main.cpp 3 The state machine executes asynchronously, i.e. it becomes part of your application's event loop. \section1 Doing Useful Work on State Entry and Exit The above state machine merely transitions from one state to another, it doesn't perform any operations. The QState::assignProperty() function can be used to have a state set a property of a QObject when the state is entered. In the following snippet, the value that should be assigned to a QLabel's text property is specified for each state: \snippet doc/src/snippets/statemachine/main.cpp 4 When any of the states is entered, the label's text will be changed accordingly. The QState::entered() signal is emitted when the state is entered, and the QState::exited() signal is emitted when the state is exited. In the following snippet, the button's showMaximized() slot will be called when state \c s3 is entered, and the button's showMinimized() slot will be called when \c s3 is exited: \snippet doc/src/snippets/statemachine/main.cpp 5 Custom states can reimplement QAbstractState::onEntry() and QAbstractState::onExit(). \section1 State Machines That Finish The state machine defined in the previous section never finishes. In order for a state machine to be able to finish, it needs to have a top-level \e final state (QFinalState object). When the state machine enters a top-level final state, the machine will emit the QStateMachine::finished() signal and halt. All you need to do to introduce a final state in the graph is create a QFinalState object and use it as the target of one or more transitions. \section1 Sharing Transitions By Grouping States Assume we wanted the user to be able to quit the application at any time by clicking a Quit button. In order to achieve this, we need to create a final state and make it the target of a transition associated with the Quit button's clicked() signal. We could add a transition from each of \c s1, \c s2 and \c s3; however, this seems redundant, and one would also have to remember to add such a transition from every new state that is added in the future. We can achieve the same behavior (namely that clicking the Quit button quits the state machine, regardless of which state the state machine is in) by grouping states \c s1, \c s2 and \c s3. This is done by creating a new top-level state and making the three original states children of the new state. The following diagram shows the new state machine. \img statemachine-button-nested.png \omit \caption This is a caption \endomit The three original states have been renamed \c s11, \c s12 and \c s13 to reflect that they are now children of the new top-level state, \c s1. Child states implicitly inherit the transitions of their parent state. This means it is now sufficient to add a single transition from \c s1 to the final state \c s2. New states added to \c s1 will also automatically inherit this transition. All that's needed to group states is to specify the proper parent when the state is created. You also need to specify which of the child states is the initial one (i.e. which child state the state machine should enter when the parent state is the target of a transition). \snippet doc/src/snippets/statemachine/main2.cpp 0 \snippet doc/src/snippets/statemachine/main2.cpp 1 In this case we want the application to quit when the state machine is finished, so the machine's finished() signal is connected to the application's quit() slot. A child state can override an inherited transition. For example, the following code adds a transition that effectively causes the Quit button to be ignored when the state machine is in state \c s12. \snippet doc/src/snippets/statemachine/main2.cpp 2 A transition can have any state as its target, i.e. the target state does not have to be on the same level in the state hierarchy as the source state. \section1 Using History States to Save and Restore the Current State Imagine that we wanted to add an "interrupt" mechanism to the example discussed in the previous section; the user should be able to click a button to have the state machine perform some non-related task, after which the state machine should resume whatever it was doing before (i.e. return to the old state, which is one of \c s11, \c s12 and \c s13 in this case). Such behavior can easily be modeled using \e{history states}. A history state (QHistoryState object) is a pseudo-state that represents the child state that the parent state was in the last time the parent state was exited. A history state is created as a child of the state for which we wish to record the current child state; when the state machine detects the presence of such a state at runtime, it automatically records the current (real) child state when the parent state is exited. A transition to the history state is in fact a transition to the child state that the state machine had previously saved; the state machine automatically "forwards" the transition to the real child state. The following diagram shows the state machine after the interrupt mechanism has been added. \img statemachine-button-history.png \omit \caption This is a caption \endomit The following code shows how it can be implemented; in this example we simply display a message box when \c s3 is entered, then immediately return to the previous child state of \c s1 via the history state. \snippet doc/src/snippets/statemachine/main2.cpp 3 \section1 Using Parallel States to Avoid a Combinatorial Explosion of States Assume that you wanted to model a set of mutually exclusive properties of a car in a single state machine. Let's say the properties we are interested in are Clean vs Dirty, and Moving vs Not moving. It would take four mutually exclusive states and eight transitions to be able to represent and freely move between all possible combinations. \img statemachine-nonparallel.png \omit \caption This is a caption \endomit If we added a third property (say, Red vs Blue), the total number of states would double, to eight; and if we added a fourth property (say, Enclosed vs Convertible), the total number of states would double again, to 16. Using parallel states, the total number of states and transitions grows linearly as we add more properties, instead of exponentially. Furthermore, states can be added to or removed from the parallel state without affecting any of their sibling states. \img statemachine-parallel.png \omit \caption This is a caption \endomit To create a parallel state group, pass QState::ParallelStates to the QState constructor. \snippet doc/src/snippets/statemachine/main3.cpp 0 When a parallel state group is entered, all its child states will be simultaneously entered. Transitions within the individual child states operate normally. However, any of the child states may take a transition which exits the parent state. When this happens, the parent state and all of its child states are exited. The parallelism in the State Machine framework follows an interleaved semantics. All parallel operations will be executed in a single, atomic step of the event processing, so no event can interrupt the parallel operations. However, events will still be processed sequentially, since the machine itself is single threaded. As an example: Consider the situation where there are two transitions that exit the same parallel state group, and their conditions become true simultaneously. In this case, the event that is processed last of the two will not have any effect, since the first event will already have caused the machine to exit from the parallel state. \section1 Detecting that a Composite State has Finished A child state can be final (a QFinalState object); when a final child state is entered, the parent state emits the QState::finished() signal. The following diagram shows a composite state \c s1 which does some processing before entering a final state: \img statemachine-finished.png \omit \caption This is a caption \endomit When \c s1 's final state is entered, \c s1 will automatically emit finished(). We use a signal transition to cause this event to trigger a state change: \snippet doc/src/snippets/statemachine/main3.cpp 1 Using final states in composite states is useful when you want to hide the internal details of a composite state; i.e. the only thing the outside world should be able to do is enter the state, and get a notification when the state has completed its work. This is a very powerful abstraction and encapsulation mechanism when building complex (deeply nested) state machines. (In the above example, you could of course create a transition directly from \c s1 's \c done state rather than relying on \c s1 's finished() signal, but with the consequence that implementation details of \c s1 are exposed and depended on). For parallel state groups, the QState::finished() signal is emitted when \e all the child states have entered final states. \section1 Targetless Transitions A transition need not have a target state. A transition without a target can be triggered the same way as any other transition; the difference is that when a targetless transition is triggered, it doesn't cause any state changes. This allows you to react to a signal or event when your machine is in a certain state, without having to leave that state. Example: \code QStateMachine machine; QState *s1 = new QState(&machine); QPushButton button; QSignalTransition *trans = new QSignalTransition(&button, SIGNAL(clicked())); s1->addTransition(trans); QMessageBox msgBox; msgBox.setText("The button was clicked; carry on."); QObject::connect(trans, SIGNAL(triggered()), &msgBox, SLOT(exec())); machine.setInitialState(s1); \endcode The message box will be displayed each time the button is clicked, but the state machine will remain in its current state (s1). If the target state were explicitly set to s1, however, s1 would be exited and re-entered each time (e.g. the QAbstractState::entered() and QAbstractState::exited() signals would be emitted). \section1 Events, Transitions and Guards A QStateMachine runs its own event loop. For signal transitions (QSignalTransition objects), QStateMachine automatically posts a QStateMachine::SignalEvent to itself when it intercepts the corresponding signal; similarly, for QObject event transitions (QEventTransition objects) a QStateMachine::WrappedEvent is posted. You can post your own events to the state machine using QStateMachine::postEvent(). When posting a custom event to the state machine, you typically also have one or more custom transitions that can be triggered from events of that type. To create such a transition, you subclass QAbstractTransition and reimplement QAbstractTransition::eventTest(), where you check if an event matches your event type (and optionally other criteria, e.g. attributes of the event object). Here we define our own custom event type, \c StringEvent, for posting strings to the state machine: \snippet doc/src/snippets/statemachine/main4.cpp 0 Next, we define a transition that only triggers when the event's string matches a particular string (a \e guarded transition): \snippet doc/src/snippets/statemachine/main4.cpp 1 In the eventTest() reimplementation, we first check if the event type is the desired one; if so, we cast the event to a StringEvent and perform the string comparison. The following is a statechart that uses the custom event and transition: \img statemachine-customevents.png \omit \caption This is a caption \endomit Here's what the implementation of the statechart looks like: \snippet doc/src/snippets/statemachine/main4.cpp 2 Once the machine is started, we can post events to it. \snippet doc/src/snippets/statemachine/main4.cpp 3 An event that is not handled by any relevant transition will be silently consumed by the state machine. It can be useful to group states and provide a default handling of such events; for example, as illustrated in the following statechart: \img statemachine-customevents2.png \omit \caption This is a caption \endomit For deeply nested statecharts, you can add such "fallback" transitions at the level of granularity that's most appropriate. \section1 Using Restore Policy To Automatically Restore Properties In some state machines it can be useful to focus the attention on assigning properties in states, not on restoring them when the state is no longer active. If you know that a property should always be restored to its initial value when the machine enters a state that does not explicitly give the property a value, you can set the global restore policy to QStateMachine::RestoreProperties. \code QStateMachine machine; machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); \endcode When this restore policy is set, the machine will automatically restore all properties. If it enters a state where a given property is not set, it will first search the hierarchy of ancestors to see if the property is defined there. If it is, the property will be restored to the value defined by the closest ancestor. If not, it will be restored to its initial value (i.e. the value of the property before any property assignments in states were executed.) Take the following code: \snippet doc/src/snippets/statemachine/main5.cpp 0 Lets say the property \c fooBar is 0.0 when the machine starts. When the machine is in state \c s1, the property will be 1.0, since the state explicitly assigns this value to it. When the machine is in state \c s2, no value is explicitly defined for the property, so it will implicitly be restored to 0.0. If we are using nested states, the parent defines a value for the property which is inherited by all descendants that do not explicitly assign a value to the property. \snippet doc/src/snippets/statemachine/main5.cpp 2 Here \c s1 has two children: \c s2 and \c s3. When \c s2 is entered, the property \c fooBar will have the value 2.0, since this is explicitly defined for the state. When the machine is in state \c s3, no value is defined for the state, but \c s1 defines the property to be 1.0, so this is the value that will be assigned to \c fooBar. \section1 Animating Property Assignments The State Machine API connects with the Animation API in Qt to allow automatically animating properties as they are assigned in states. Say we have the following code: \snippet doc/src/snippets/statemachine/main5.cpp 3 Here we define two states of a user interface. In \c s1 the \c button is small, and in \c s2 it is bigger. If we click the button to transition from \c s1 to \c s2, the geometry of the button will be set immediately when a given state has been entered. If we want the transition to be smooth, however, all we need to do is make a QPropertyAnimation and add this to the transition object. \snippet doc/src/snippets/statemachine/main5.cpp 4 Adding an animation for the property in question means that the property assignment will no longer take immediate effect when the state has been entered. Instead, the animation will start playing when the state has been entered and smoothly animate the property assignment. Since we do not set the start value or end value of the animation, these will be set implicitly. The start value of the animation will be the property's current value when the animation starts, and the end value will be set based on the property assignments defined for the state. If the global restore policy of the state machine is set to QStateMachine::RestoreProperties, it is possible to also add animations for the property restorations. \section1 Detecting That All Properties Have Been Set In A State When animations are used to assign properties, a state no longer defines the exact values that a property will have when the machine is in the given state. While the animation is running, the property can potentially have any value, depending on the animation. In some cases, it can be useful to be able to detect when the property has actually been assigned the value defined by a state. Say we have the following code: \snippet doc/src/snippets/statemachine/main5.cpp 5 When \c button is clicked, the machine will transition into state \c s2, which will set the geometry of the button, and then pop up a message box to alert the user that the geometry has been changed. In the normal case, where animations are not used, this will operate as expected. However, if an animation for the \c geometry of \c button is set on the transition between \c s1 and \c s2, the animation will be started when \c s2 is entered, but the \c geometry property will not actually reach its defined value before the animation is finished running. In this case, the message box will pop up before the geometry of the button has actually been set. To ensure that the message box does not pop up until the geometry actually reaches its final value, we can use the state's propertiesAssigned() signal. The propertiesAssigned() signal will be emitted when the property is assigned its final value, whether this is done immediately or after the animation has finished playing. \snippet doc/src/snippets/statemachine/main5.cpp 6 In this example, when \c button is clicked, the machine will enter \c s2. It will remain in state \c s2 until the \c geometry property has been set to \c QRect(0, 0, 50, 50). Then it will transition into \c s3. When \c s3 is entered, the message box will pop up. If the transition into \c s2 has an animation for the \c geometry property, then the machine will stay in \c s2 until the animation has finished playing. If there is no such animation, it will simply set the property and immediately enter state \c s3. Either way, when the machine is in state \c s3, you are guaranteed that the property \c geometry has been assigned the defined value. If the global restore policy is set to QStateMachine::RestoreProperties, the state will not emit the propertiesAssigned() signal until these have been executed as well. \section1 What Happens If A State Is Exited Before The Animation Has Finished If a state has property assignments, and the transition into the state has animations for the properties, the state can potentially be exited before the properties have been assigned to the values defines by the state. This is true in particular when there are transitions out from the state that do not depend on the propertiesAssigned signal, as described in the previous section. The State Machine API guarantees that a property assigned by the state machine either: \list \o Has a value explicitly assigned to the property. \o Is currently being animated into a value explicitly assigned to the property. \endlist When a state is exited prior to the animation finishing, the behavior of the state machine depends on the target state of the transition. If the target state explicitly assigns a value to the property, no additional action will be taken. The property will be assigned the value defined by the target state. If the target state does not assign any value to the property, there are two options: By default, the property will be assigned the value defined by the state it is leaving (the value it would have been assigned if the animation had been permitted to finish playing). If a global restore policy is set, however, this will take precedence, and the property will be restored as usual. \section1 Default Animations As described earlier, you can add animations to transitions to make sure property assignments in the target state are animated. If you want a specific animation to be used for a given property regardless of which transition is taken, you can add it as a default animation to the state machine. This is in particular useful when the properties assigned (or restored) by specific states is not known when the machine is constructed. \code QState *s1 = new QState(); QState *s2 = new QState(); s2->assignProperty(object, "fooBar", 2.0); s1->addTransition(s2); QStateMachine machine; machine.setInitialState(s1); machine.addDefaultAnimation(new QPropertyAnimation(object, "fooBar")); \endcode When the machine is in state \c s2, the machine will play the default animation for the property \c fooBar since this property is assigned by \c s2. Note that animations explicitly set on transitions will take precedence over any default animation for the given property. */ .cpp?h=v4.8.5&id=fcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6'>src/gui/image/qpixmap_x11.cpp28
-rw-r--r--src/gui/itemviews/qheaderview.cpp4
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp3
-rw-r--r--src/gui/itemviews/qtreeview.cpp8
-rw-r--r--src/gui/kernel/qapplication_win.cpp29
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm2
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm28
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
-rw-r--r--src/gui/kernel/qcursor.cpp4
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/painting/qcolor.cpp8
-rw-r--r--src/gui/painting/qcolormap_x11.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp8
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp8
-rw-r--r--src/gui/styles/qgtkstyle.cpp65
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp9
-rw-r--r--src/gui/text/qfont.cpp14
-rw-r--r--src/gui/text/qfont_x11.cpp11
-rw-r--r--src/gui/text/qfontengine_win.cpp6
-rw-r--r--src/gui/text/qfontmetrics.cpp12
-rw-r--r--src/gui/widgets/qtabbar.cpp11
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp3
-rw-r--r--src/network/socket/qabstractsocket.cpp28
-rw-r--r--src/network/ssl/qsslcertificate.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp25
-rw-r--r--src/opengl/qgl.cpp48
-rw-r--r--src/opengl/qgl_win.cpp16
-rw-r--r--src/opengl/qgl_wince.cpp3
-rw-r--r--src/opengl/qgl_x11.cpp30
-rw-r--r--src/svg/qsvggenerator.cpp2
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp8
-rw-r--r--tests/auto/qdate/tst_qdate.cpp26
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp33
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp36
-rw-r--r--tests/auto/qmake/tst_qmake.cpp16
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp10
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp30
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp166
-rw-r--r--tools/assistant/tools/assistant/centralwidget.h10
-rw-r--r--tools/assistant/translations/qt_help.pro3
-rw-r--r--tools/assistant/translations/translations.pro3
-rw-r--r--tools/qdoc3/doc.cpp4
-rw-r--r--tools/qdoc3/main.cpp4
-rw-r--r--tools/qdoc3/test/classic.css8
-rw-r--r--translations/assistant_da.ts1166
-rw-r--r--translations/qt_da.ts7745
-rw-r--r--translations/qt_help_da.ts387
-rw-r--r--translations/translations.pri2
94 files changed, 10183 insertions, 515 deletions
diff --git a/configure b/configure
index b57e8cb..85ce3da 100755
--- a/configure
+++ b/configure
@@ -2704,23 +2704,24 @@ fi
if [ "$PLATFORM_MAC" = "yes" ]; then
# check -arch arguments for validity.
ALLOWED="x86 ppc x86_64 ppc64 i386"
- for i in $CFG_MAC_ARCHS
+ # Save the list so we can re-write it using only valid values
+ CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
+ CFG_MAC_ARCHS=
+ for i in $CFG_MAC_ARCHS_IN
do
if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
exit 2;
fi
- done
-
-# replace "i386" with "x86" to support configuring with -arch i386 as an alias for x86.
- CFG_MAC_ARCHS="${CFG_MAC_ARCHS/i386/x86}"
-
-# Build commmand line arguments we can pass to the compiler during configure tests
-# by prefixing each arch with "-arch".
- CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/x86/i386}"
- CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS_GCC_FORMAT/i386_64/x86_64}"
- for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do
- MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH"
+ if [ "$i" = "i386" -o "$i" = "x86" ]; then
+ # These are synonymous values
+ # CFG_MAC_ARCHS requires x86 while GCC requires i386
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386"
+ else
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i"
+ fi
done
fi
@@ -4130,14 +4131,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
X86_CFLAGS="-arch i386"
X86_LFLAGS="-arch i386"
EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
fi
- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
PPC_CFLAGS="-arch ppc"
PPC_LFLAGS="-arch ppc"
EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
diff --git a/demos/spreadsheet/spreadsheetdelegate.cpp b/demos/spreadsheet/spreadsheetdelegate.cpp
index 465c92f..2916757 100644
--- a/demos/spreadsheet/spreadsheetdelegate.cpp
+++ b/demos/spreadsheet/spreadsheetdelegate.cpp
@@ -51,7 +51,7 @@ QWidget *SpreadSheetDelegate::createEditor(QWidget *parent,
{
if (index.column() == 1) {
QDateTimeEdit *editor = new QDateTimeEdit(parent);
- editor->setDisplayFormat("dd/M/yyy");
+ editor->setDisplayFormat("dd/M/yyyy");
editor->setCalendarPopup(true);
return editor;
}
@@ -93,7 +93,7 @@ void SpreadSheetDelegate::setEditorData(QWidget *editor,
if (dateEditor) {
dateEditor->setDate(QDate::fromString(
index.model()->data(index, Qt::EditRole).toString(),
- "d/M/yy"));
+ "d/M/yyyy"));
}
}
}
@@ -107,7 +107,7 @@ void SpreadSheetDelegate::setModelData(QWidget *editor,
} else {
QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor);
if (dateEditor) {
- model->setData(index, dateEditor->date().toString("dd/M/yyy"));
+ model->setData(index, dateEditor->date().toString("dd/M/yyyy"));
}
}
}
diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc
index 2706182..8d3ae71 100644
--- a/doc/src/designer-manual.qdoc
+++ b/doc/src/designer-manual.qdoc
@@ -235,6 +235,7 @@
\page designer-to-know.html
\contentspage {Qt Designer Manual}{Contents}
+
\title Getting to Know Qt Designer
\tableofcontents
@@ -298,12 +299,12 @@
\row
\i \inlineimage designer-widget-box.png
\i \bold{Qt Designer's Widget Box}
-
+
The widget box provides a selection of standard Qt widgets, layouts,
and other objects that can be used to create user interfaces on forms.
Each of the categories in the widget box contain widgets with similar
uses or related features.
-
+
\note Since Qt 4.4, new widgets have been included, e.g.,
QPlainTextEdit, QCommandLinkButton, QScrollArea, QMdiArea, and
QWebView.
@@ -357,7 +358,7 @@
using a grid. The coordinates on the screenshot show the position of each
widget within the grid.
- \image addressbook-tutorial-part3-labeled-layout.png
+ \image addressbook-tutorial-part3-labeled-layout.png
\note Inside the grid, the QPushButton objects are actually nested. The
buttons on the right are first placed in a QVBoxLayout; the buttons at the
@@ -366,7 +367,7 @@
To visualize, imagine the layout as a box that shrinks as much as possible,
attempting to \e squeeze your widgets in a neat arrangement, and, at the
- same time, maximize the use of available space.
+ same time, maximize the use of available space.
Qt's layouts help when you:
@@ -408,6 +409,7 @@
\page designer-quick-start.html
\contentspage {Qt Designer Manual}{Contents}
+
\title A Quick Start to Qt Designer
Using \QD involves \bold four basic steps:
@@ -419,16 +421,14 @@
\o Preview the form
\endlist
- \omit
\image rgbController-screenshot.png
- \endomit
- Suppose you would like to design a small widget (see screenshot above)
- that contains the controls needed to manipulate Red, Green and Blue (RGB)
- values -- a type of widget that can be seen everywhere in image
- manipulation programs.
+ Suppose you would like to design a small widget (see screenshot above) that
+ contains the controls needed to manipulate Red, Green and Blue (RGB) values
+ -- a type of widget that can be seen everywhere in image manipulation
+ programs.
- \table
+ \table
\row
\i \inlineimage designer-choosing-form.png
\i \bold{Choosing a Form}
@@ -436,39 +436,32 @@
You start by choosing \gui Widget from the \gui{New Form} dialog.
\endtable
- Then you drag three labels, three spin boxes and three vertical sliders
- on to your form. You can roughly arrange them according to how you would
- like them to be laid out.
- \omit
\table
- \row \o \inlineimage rgbController-widgetBox.png
- \o \inlineimage rgbController-arrangement.png
+ \row
+ \i \inlineimage rgbController-arrangement.png
+ \i \bold{Placing Widgets on a Form}
+
+ Drag three labels, three spin boxes and three vertical sliders on to your
+ form. To change the label's default text, simply double-click on it. You
+ can arrange them according to how you would like them to be laid out.
\endtable
- \endomit
To ensure that they are laid out exactly like this in your program, you
need to place these widgets into a layout. We will do this in groups of
- three. Select the "RED" label. Then, hold down \key Shift while you select
+ three. Select the "RED" label. Then, hold down \key Ctrl while you select
its corresponding spin box and slider. In the \gui{Form} menu, select
\gui{Lay Out in a Grid}.
- \omit
\table
\row
\i \inlineimage rgbController-form-gridLayout.png
\i \inlineimage rgbController-selectForLayout.png
\endtable
- \endomit
Repeat the step for the other two labels along with their corresponding
- spin boxes and sliders as well. Your form will now look similar to the
- screenshot below.
-
- \omit
- \image rgbController-almostLaidOut.png
- \endomit
+ spin boxes and sliders as well.
The next step is to combine all three layouts into one \bold{main layout}.
It is important that your form has a main layout; otherwise, the widgets
@@ -476,24 +469,26 @@
layout, \gui{Right click} anywhere on your form, outside of the three
separate layouts, and select \gui{Lay Out Horizontally}. Alternatively, you
could also select \gui{Lay Out in a Grid} -- you will still see the same
- arrangement.
+ arrangement (shown below).
+
+ \image rgbController-final-layout.png
\note Main layouts cannot be seen on the form. To check if you have a main
layout installed, try resizing your form; your widgets should resize
accordingly.
When you click on the slider and drag it to a certain value, you want the
- spin box to display the slider's position. To do this, you need to connect
- the slider's \l{QAbstractSlider::}{valueChanged()} signal to the spin box's
- \l{QSpinBox::}{setValue()} slot. You also need to make the reverse
- connections, e.g., connect the spin box's \l{QSpinBox::}{valueChanged()}
- signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot.
+ spin box to display the slider's position. To accomplish this behavior, you
+ need to connect the slider's \l{QAbstractSlider::}{valueChanged()} signal
+ to the spin box's \l{QSpinBox::}{setValue()} slot. You also need to make
+ the reverse connections, e.g., connect the spin box's \l{QSpinBox::}
+ {valueChanged()} signal to the slider's \l{QAbstractSlider::value()}
+ {setValue()} slot.
To do this, you have to switch to \gui{Edit Signals/Slots} mode, either by
pressing \key{F4} or something \gui{Edit Signals/Slots} from the \gui{Edit}
menu.
- \omit
\table
\row
\i \inlineimage rgbController-signalsAndSlots.png
@@ -503,17 +498,19 @@
\gui{Configure Connection} dialog, shown below, will pop up. Select the
correct signal and slot and click \gui OK.
\endtable
- \endomit
- \omit
- \image rgbController-configureConnection.png
- \endomit
+ \image rgbController-configureConnection1.png
Repeat the step (in reverse order), clicking on the spin box and dragging
the cursor towards the slider, to connect the spin box's
\l{QSpinBox::}{valueChanged()} signal to the slider's
\l{QAbstractSlider::value()}{setValue()} slot.
+ You can use the screenshot below as a guide to selecting the correct signal
+ and slot.
+
+ \image rgbController-configure-connection2.png
+
Now that you have successfully connected the objects for the "RED"
component of the RGB Controller, do the same for the "GREEN" and "BLUE"
components as well.
@@ -521,7 +518,6 @@
Since RGB values range between 0 and 255, we need to limit the spin box
and slider to that particular range.
- \omit
\table
\row
\i \inlineimage rgbController-property-editing.png
@@ -532,17 +528,14 @@
\l{QSpinBox::}{maximum} property. Then, click on the first vertical
slider, you will see \l{QAbstractSlider}'s properties. Enter "255" for
the \l{QAbstractSlider::}{maximum} property as well. Repeat this
- process for the remaining spin boxes and sliders.
+ process for the remaining spin boxes and sliders.
\endtable
- \endomit
Now, we preview your form to see how it would look in your application. To
preview your form, press \key{Ctrl + R} or select \gui Preview from the
\gui Form menu.
- \omit
\image rgbController-preview.png
- \endomit
Try dragging the slider - the spin box will mirror its value too (and vice
versa). Also, you can resize it to see how the layouts used to manage the
@@ -788,11 +781,11 @@
have a \c text property that can also be edited by double-clicking
on the widget or by pressing \gui F2. \QD interprets the backslash
(\\) character specially, enabling newline (\\n) characters to be
- inserted into the text; the \\\\ character sequence is used to
+ inserted into the text; the \\\\ character sequence is used to
insert a single backslash into the text. A context menu can also be
opened while editing, providing another way to insert special
characters and newlines into the text.
- \endlist
+ \endlist
\section2 Dynamic Properties
@@ -804,12 +797,12 @@
\image designer-property-editor-toolbar.png
- To add a dynamic property, clcik on the \gui Add button
+ To add a dynamic property, clcik on the \gui Add button
\inlineimage designer-property-editor-add-dynamic.png
- . To remove it, click on the \gui Remove button
+ . To remove it, click on the \gui Remove button
\inlineimage designer-property-editor-remove-dynamic.png
instead. You can also sort the properties alphabetically and change the
- color groups by clickinig on the \gui Configure button
+ color groups by clickinig on the \gui Configure button
\inlineimage designer-property-editor-configure.png
.
@@ -911,7 +904,7 @@
\section2 Horizontal and Vertical Layouts
-
+
The simplest way to arrange objects on a form is to place them in a
horizontal or vertical layout. Horizontal layouts ensure that the widgets
within are aligned horizontally; vertical layouts ensure that they are
@@ -1138,7 +1131,7 @@
spacers just provide spacing hints to layouts, so they cannot be connected
to other objects.
-
+
\target HighlightedObjects
\table
\row
@@ -1177,7 +1170,7 @@
\image designer-connection-dialog.png
- To complete the connection, select a signal from the source object and a
+ To complete the connection, select a signal from the source object and a
slot from the destination object, then click \key OK. Click \key Cancel if
you wish to abandon the connection.
@@ -1720,22 +1713,22 @@
\i \bold{Resource Files}
Within the resource browser, you can open existing resource files or
- create new ones. Click the \gui{Edit Resources} button
+ create new ones. Click the \gui{Edit Resources} button
\inlineimage designer-edit-resources-button.png
to edit your resources. To reload resources, click on the \gui Reload
- button
+ button
\inlineimage designer-reload-resources-button.png
.
\endtable
Once a resource file is loaded, you can create or remove entries in it
- using the given \gui{Add Files}
- \inlineimage designer-add-resource-entry-button.png
- and \gui{Remove Files}
+ using the given \gui{Add Files}
+ \inlineimage designer-add-resource-entry-button.png
+ and \gui{Remove Files}
\inlineimage designer-remove-resource-entry-button.png
buttons, and specify resources (e.g., images) using the \gui{Add Files}
- button
+ button
\inlineimage designer-add-files-button.png
. Note that these resources must reside within the current resource file's
directory or one of its subdirectories.
@@ -1747,15 +1740,15 @@
\i \inlineimage designer-edit-resource.png
\i \bold{Editing Resource Files}
- Press the
+ Press the
\inlineimage designer-add-resource-entry-button.png
button to add a new resource entry to the file. Then use the
- \gui{Add Files} button
+ \gui{Add Files} button
\inlineimage designer-add-files-button.png
to specify the resource.
You can remove resources by selecting the corresponding entry in the
- resource editor, and pressing the
+ resource editor, and pressing the
\inlineimage designer-remove-resource-entry-button.png
button.
\endtable
@@ -2657,7 +2650,7 @@ pixmap property in the property editor.
QDesignerTaskMenuExtension is useful for custom widgets. It provides an
extension that allows you to add custom menu entries to \QD's task
menu.
-
+
The \l{designer/taskmenuextension}{Task Menu Extension} example
illustrates how to use this class.
@@ -2758,7 +2751,7 @@ pixmap property in the property editor.
function, making it able to create your extension, such as a
\l{designer/containerextension}{MultiPageWidget} container extension.
- You can either create a new QExtensionFactory and reimplement the
+ You can either create a new QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function:
\snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8
diff --git a/doc/src/emb-fonts.qdoc b/doc/src/emb-fonts.qdoc
index 3ed23c3..86e169d 100644
--- a/doc/src/emb-fonts.qdoc
+++ b/doc/src/emb-fonts.qdoc
@@ -131,7 +131,7 @@
The Qt Prerendered Font (QPF2) is an architecture-independent,
light-weight and non-scalable font format specific to \l{Qt for Embedded Linux}.
- Nokia provides the cross-platform \c makeqpf tool, included in the
+ Nokia provides the cross-platform \l makeqpf tool, included in the
\c tools directory of both \l {Qt} and \l{Qt for Embedded Linux}, which allows
generation of QPF2 files from system fonts.
diff --git a/doc/src/emb-makeqpf.qdoc b/doc/src/emb-makeqpf.qdoc
index ca33eda..8f5d10b 100644
--- a/doc/src/emb-makeqpf.qdoc
+++ b/doc/src/emb-makeqpf.qdoc
@@ -44,7 +44,10 @@
\title makeqpf
\ingroup qt-embedded-linux
- \c makeqpf is not part of Qt 4. However, Qt 4 can still read QPF
- files generated by Qt 2 or 3. To generate QPF files, use makeqpf from Qt 2
- or 3.
+ \c makeqpf is a tool to generate pre-rendered fonts in QPF2 format for use on Embedded Linux.
+
+ Qt 4 can read files in QPF2 format in addition to QPF files generated by older versions of
+ \c makeqpf from Qt 2 or 3.
+
+ \sa {Qt for Embedded Linux Fonts}
*/
diff --git a/doc/src/images/designer-choosing-form.png b/doc/src/images/designer-choosing-form.png
index fa6e470..bee4b29 100644
--- a/doc/src/images/designer-choosing-form.png
+++ b/doc/src/images/designer-choosing-form.png
Binary files differ
diff --git a/doc/src/images/rgbController-arrangement.png b/doc/src/images/rgbController-arrangement.png
new file mode 100644
index 0000000..d9e8bab
--- /dev/null
+++ b/doc/src/images/rgbController-arrangement.png
Binary files differ
diff --git a/doc/src/images/rgbController-configure-connection1.png b/doc/src/images/rgbController-configure-connection1.png
new file mode 100644
index 0000000..0798184
--- /dev/null
+++ b/doc/src/images/rgbController-configure-connection1.png
Binary files differ
diff --git a/doc/src/images/rgbController-configure-connection2.png b/doc/src/images/rgbController-configure-connection2.png
new file mode 100644
index 0000000..f3fcc62
--- /dev/null
+++ b/doc/src/images/rgbController-configure-connection2.png
Binary files differ
diff --git a/doc/src/images/rgbController-final-layout.png b/doc/src/images/rgbController-final-layout.png
new file mode 100644
index 0000000..d32a93e
--- /dev/null
+++ b/doc/src/images/rgbController-final-layout.png
Binary files differ
diff --git a/doc/src/images/rgbController-form-gridLayout.png b/doc/src/images/rgbController-form-gridLayout.png
new file mode 100644
index 0000000..c8f3dcf
--- /dev/null
+++ b/doc/src/images/rgbController-form-gridLayout.png
Binary files differ
diff --git a/doc/src/images/rgbController-property-editing.png b/doc/src/images/rgbController-property-editing.png
new file mode 100644
index 0000000..64fc500
--- /dev/null
+++ b/doc/src/images/rgbController-property-editing.png
Binary files differ
diff --git a/doc/src/images/rgbController-screenshot.png b/doc/src/images/rgbController-screenshot.png
new file mode 100644
index 0000000..6019233
--- /dev/null
+++ b/doc/src/images/rgbController-screenshot.png
Binary files differ
diff --git a/doc/src/images/rgbController-selectForLayout.png b/doc/src/images/rgbController-selectForLayout.png
new file mode 100644
index 0000000..7a8e184
--- /dev/null
+++ b/doc/src/images/rgbController-selectForLayout.png
Binary files differ
diff --git a/doc/src/images/rgbController-signalsAndSlots.png b/doc/src/images/rgbController-signalsAndSlots.png
new file mode 100644
index 0000000..2ba3aba
--- /dev/null
+++ b/doc/src/images/rgbController-signalsAndSlots.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 4ead9e4..23e8623 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -153,6 +153,7 @@
<li><a href="overviews.html">All Overviews and HOWTOs</a></li>
<li><a href="gallery.html">Qt Widget Gallery</a></li>
<li><a href="http://doc.trolltech.com/extras/qt43-class-chart.pdf">Class Chart</a></li>
+ <li><a href="qtglobal.html">Qt Global Declarations</a></li>
</ul>
</td>
<td valign="top">
@@ -207,10 +208,10 @@
<td valign="top">
<ul>
<li><a href="http://www.qtsoftware.com/products/add-on-products">Qt Solutions</a></li>
- <li><a href="http://www.qtsoftware.com/products/qt/3rdparty/">Partner Add-ons</a></li>
+ <li><a href="http://www.qtsoftware.com/products/appdev">Partner Add-ons</a></li>
<li><a href="http://qt-apps.org">Third-Party Qt Components (qt-apps.org)</a></li>
- <li><a href="http://www.qtsoftware.com/support/">Support</a></li>
- <li><a href="http://www.qtsoftware.com/support/training/">Training</a></li>
+ <li><a href="http://www.qtsoftware.com/support-services/support-services/">Support</a></li>
+ <li><a href="http://www.qtsoftware.com/support-services/training/">Training</a></li>
</ul>
</td>
<td valign="top">
diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc
index 925a195..6a689f9 100644
--- a/doc/src/installation.qdoc
+++ b/doc/src/installation.qdoc
@@ -738,8 +738,6 @@ in the \l{Qt for Windows CE Requirements} document.
\header \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal
\row \o linux-x86-g++ \o GCC 4.2.4 \o 1.7M \o 2.7M \o 3.3M \o 9.9M \o 653K \o 1.1M \o N/A \o 17M
\row \o linux-arm-g++ \o GCC 4.1.1 \o 1.9M \o 3.2M \o 4.1M \o 11M \o 507K \o 1.0M \o N/A \o 17M
- \row \o linux-arm-g++ (thumb)
- \o GCC 4.1.1 \o 1.7M \o 2.8M \o 4.0M \o 9.8M \o 409K \o 796K \o N/A \o 17M
\row \o linux-mips-g++ (MIPS32)
\o GCC 4.2.4 \o 2.0M \o 3.2M \o 4.5M \o 12M \o 505K \o 1003K \o N/A \o 21M
\endtable
diff --git a/doc/src/qset.qdoc b/doc/src/qset.qdoc
index 2d12661..a168800 100644
--- a/doc/src/qset.qdoc
+++ b/doc/src/qset.qdoc
@@ -695,11 +695,12 @@
*/
/*!
- \typedef QSet::iterator::iterator_category
- \typedef QSet::const_iterator::iterator_category
+ \typedef QSet::iterator::iterator_category
+ \typedef QSet::const_iterator::iterator_category
- \internal
-*/
+ Synonyms for \e {std::bidirectional_iterator_tag} indicating
+ these iterators are bidirectional iterators.
+ */
/*!
\typedef QSet::iterator::difference_type
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index a57de9d..d9e38ed 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
@@ -6,7 +6,7 @@ public:
{
qreal penWidth = 1;
return QRectF(-10 - penWidth / 2, -10 - penWidth / 2,
- 20 + penWidth / 2, 20 + penWidth / 2);
+ 20 + penWidth, 20 + penWidth);
}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp
index 07cedbf..be171c6 100644
--- a/doc/src/snippets/picture/picture.cpp
+++ b/doc/src/snippets/picture/picture.cpp
@@ -66,7 +66,7 @@ int main()
QPicture picture;
picture.load("drawing.pic"); // load picture
QPainter painter;
- painter.begin(&myWidget); // paint in myWidget
+ painter.begin(&myImage); // paint in myImage
painter.drawPicture(0, 0, picture); // draw the picture at (0,0)
painter.end(); // painting done
//! [1]
diff --git a/doc/src/tools-list.qdoc b/doc/src/tools-list.qdoc
index 7af9936..caef268 100644
--- a/doc/src/tools-list.qdoc
+++ b/doc/src/tools-list.qdoc
@@ -58,12 +58,10 @@
\o Translate applications to reach international markets.
\row \o \l{qmake Manual}{qmake}
\o Create makefiles from simple platform-independent project files (\c .pro files).
- \omit
- \row \o \l{emb-qvfb.html}{qvfb}
+ \row \o \l{The Virtual Framebuffer}{qvfb}
\o Run and test embedded applications on the desktop.
- \row \o \l{emb-makeqpf.html}{makeqpf}
+ \row \o \l{makeqpf}
\o Create pre-rendered fonts for embedded devices.
- \endomit
\row \o \l{moc}{Meta-Object Compiler (moc)}
\o Generate meta-object information for QObject subclasses.
\row \o \l{User Interface Compiler (uic)}
diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc
index 301f0d4..6ef3a89 100644
--- a/doc/src/topics.qdoc
+++ b/doc/src/topics.qdoc
@@ -286,11 +286,9 @@ including ARM, Intel x86, MIPS and SH-4.
\o \l {Qt for Windows CE Requirements}
\o \l {Installing Qt on Windows CE}
\o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt}
- \o \l {Qt Examples#Qt for Embedded Linux}{Examples}
\endlist
\o
\list
- \o \l {Qt for Embedded Linux Classes}{Classes}
\o \l {Windows CE - Using shadow builds}{Using shadow builds}
\o \l {Windows CE - Working with Custom SDKs}{Working with Custom SDKs}
\endlist
diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro
index deed112..4f5aaad 100644
--- a/examples/itemviews/puzzle/puzzle.pro
+++ b/examples/itemviews/puzzle/puzzle.pro
@@ -12,3 +12,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg
sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle
INSTALLS += target sources
+
+wince* {
+ DEPLOYMENT_PLUGIN += qjpeg qgif qtiff
+}
+
diff --git a/examples/network/googlesuggest/googlesuggest.pro b/examples/network/googlesuggest/googlesuggest.pro