From 7eb53c4b8d9745f998694f3dbe88dab6791d0e81 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 13 Sep 2010 15:08:00 +0200 Subject: Added a QFormLayout snippet to the layout.qdoc and layouts.cpp Reviewed-by: David Boddie Tasks: QTBUG-10077 --- doc/src/snippets/layouts/layouts.cpp | 42 ++++++++++++++++++++++++++++++--- doc/src/widgets-and-layouts/layout.qdoc | 16 +++++++++++-- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/doc/src/snippets/layouts/layouts.cpp b/doc/src/snippets/layouts/layouts.cpp index 66c9b9d..58440f5 100644 --- a/doc/src/snippets/layouts/layouts.cpp +++ b/doc/src/snippets/layouts/layouts.cpp @@ -66,7 +66,9 @@ int main(int argc, char *argv[]) layout->addWidget(button5); window->setLayout(layout); -//! [4] //! [5] +//! [4] + window->setWindowTitle("QHBoxLayout"); +//! [5] window->show(); //! [5] } @@ -93,7 +95,9 @@ int main(int argc, char *argv[]) layout->addWidget(button5); window->setLayout(layout); -//! [10] //! [11] +//! [10] + window->setWindowTitle("QVBoxLayout"); +//! [11] window->show(); //! [11] } @@ -120,10 +124,42 @@ int main(int argc, char *argv[]) layout->addWidget(button5, 2, 1); window->setLayout(layout); -//! [16] //! [17] +//! [16] + window->setWindowTitle("QGridLayout"); +//! [17] window->show(); //! [17] } + { +//! [18] + QWidget *window = new QWidget; +//! [18] +//! [19] + QPushButton *button1 = new QPushButton("One"); + QLineEdit *lineEdit1 = new QLineEdit(); +//! [19] +//! [20] + QPushButton *button2 = new QPushButton("Two"); + QLineEdit *lineEdit2 = new QLineEdit(); + QPushButton *button3 = new QPushButton("Three"); + QLineEdit *lineEdit3 = new QLineEdit(); +//! [20] +//! [21] + QFormLayout *layout = new QFormLayout; +//! [21] +//! [22] + layout->addRow(button1, lineEdit1); + layout->addRow(button2, lineEdit2); + layout->addRow(button3, lineEdit3); + + window->setLayout(layout); +//! [22] + window->setWindowTitle("QFormLayout"); +//! [23] + window->show(); +//! [23] + } + return app.exec(); } diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc index 32dddd7..4db991a 100644 --- a/doc/src/widgets-and-layouts/layout.qdoc +++ b/doc/src/widgets-and-layouts/layout.qdoc @@ -116,7 +116,7 @@ \section2 Laying Out Widgets in Code The following code creates a QHBoxLayout that manages the geometry of five - \l{QPushButton}s, as shown on the first screenshot above: + \l{QPushButton}{QPushButtons}, as shown on the first screenshot above: \snippet doc/src/snippets/layouts/layouts.cpp 0 \snippet doc/src/snippets/layouts/layouts.cpp 1 @@ -141,7 +141,19 @@ The third QPushButton spans 2 columns. This is possible by specifying 2 as the fifth argument to QGridLayout::addWidget(). - Finally, the code for QFormLayout is .. + QFormLayout will add two widgets on a row, commonly a QLabel and a QLineEdit + to create forms. Adding a QLabel and a QLineEdit on the same row will set + the QLineEdit as the QLabel's buddy. The following code will use the + QFormLayout to place three \l{QPushButton}{QPushButtons} and a corresponding + QLineEdit on a row. + + \snippet doc/src/snippets/layouts/layouts.cpp 18 + \snippet doc/src/snippets/layouts/layouts.cpp 19 + \snippet doc/src/snippets/layouts/layouts.cpp 20 + \codeline + \snippet doc/src/snippets/layouts/layouts.cpp 21 + \snippet doc/src/snippets/layouts/layouts.cpp 22 + \snippet doc/src/snippets/layouts/layouts.cpp 23 \section2 Tips for Using Layouts -- cgit v0.12 From 3e7c69afd0c69b2fffccf4e8cb6f292366f3217f Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 14 Sep 2010 14:51:47 +0200 Subject: Added statement regarding validators and input masks on the same line edit. Reviewed-by: David Boddie Bug:QTBUG-11324 --- src/gui/widgets/qlineedit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 981e934..a60b30d 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -139,7 +139,10 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const The length of the text can be constrained to maxLength(). The text can be arbitrarily constrained using a validator() or an - inputMask(), or both. + inputMask(), or both. When switching between a validator and an input mask + on the same line edit, it is best to clear the validator or input mask to + prevent undefined behavior. + A related class is QTextEdit which allows multi-line, rich text editing. -- cgit v0.12 From 53352584bbf81b577998b9f5a7dd2f7191870754 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 16 Sep 2010 11:03:06 +0200 Subject: Doc: Cleaning up the known issues page. Pointing people to check the online resources. --- doc/src/getting-started/known-issues.qdoc | 125 ++---------------------------- 1 file changed, 5 insertions(+), 120 deletions(-) diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc index 0c2d8d8..942c41d 100644 --- a/doc/src/getting-started/known-issues.qdoc +++ b/doc/src/getting-started/known-issues.qdoc @@ -29,127 +29,12 @@ \page known-issues.html \title Known Issues \ingroup platform-specific - \brief A summary of known issues in this Qt version at the time of release. + \brief Links to online resources stating known issues in this Qt version at the time of release. - An up-to-date list of known issues can be found at - \l{http://bugreports.qt.nokia.com/}{Qt Bug Tracker}. - - For a list list of known bugs, see the \l{Task Tracker} at the Qt - website. - - An overview of known issues may also be found at: - \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} + \list + \o An up-to-date list of known issues can be found at \l{http://bugreports.qt.nokia.com/}{Qt Bug Tracker}. + \o For a list list of known bugs, see the \l{Task Tracker} at the Qt website. + \o An overview of known issues may also be found at: \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} {Known Issues Wiki}. - - \section1 Installation Issues - - \section2 Installing the Source Package on Unix systems - - \list - - \o If you download a Zip source package, you will need to convert - Windows-style line endings (CR/LF) to Unix-style line-endings (LF) when - you uncompress the package. To do this, give the "-a" option when you - run the "unzip' command. - - \o If you fail to supply the "-a" option when unzipping the package, you - will see the following error message when you attempt to execute the - configure command: - "bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory" - - \endlist - - \section2 Installing on Mac OS X 10.6 "Snow Leopard" - - \list - - \o There are two workarounds, either disable spotlight for the target - drive during the install, or do a custom install where you deselect - documentation and examples. Run the installer again as a full - install to get the documentation and examples installed. - - \endlist - - \section1 Issues with Third Party Software - - \section2 X11 - - \list - \o There is a bug in the 169.xx NVIDIA drivers on certain GeForce 8 series - cards that is triggered by the OpenGL paint engine when using QPainter - on a QGLWidget to draw paths and polygons. Some other painting - operations that end up in the path fallback are affected as well. The - bug causes the whole X server to repeatedly hang for several seconds at - a time. - \o There is an issue with NVIDIA's 9xxx driver series on X11 that causes a - crash in cases where there are several \l{QGLContext}s and the extended - composition modes are used (the composition modes between and including - QPainter::CompositionMode_Multiply and - QPainter::CompositionMode_Exclusion). This affects the composition mode - demo in Qt 4.5, for example. The crash does not occur in newer versions - of the drivers. - \endlist - - \section2 Windows - - \list - - \o When using version 6.14.11.6921 of the NVIDIA drivers for the GeForce - 6600 GT under Windows XP, Qt applications which use drag and drop will - display reduced size drag and drop icons when run alongside - applications that use OpenGL. This problem can be worked around by - reducing the level of graphics acceleration provided by the driver, or - by disabling hardware acceleration completely. - - \o With NVIDIA GeForce 7950 GT (driver version 6.14.11.7824), a fullscreen - QGLWidget flickers when child widgets are shown/hidden. The workaround - for this is to use \l{QWidget::}{setGeometry()} with a width/height 1 - pixel bigger than your geometry and call \l{QWidget::}{show()}. - - \o A bug in the Firebird database can cause an application to crash when - \c{fbembed.dll} is unloaded. The bug is fixed in version 2.5. - - \o On Windows 7, resizing windows is slower than on Vista/Xp. This is because - the gesture initialization process (required for native gesture support) - currently calls winId() on widgets, which causes whole widget hierarchies - to use native window handles. This slows down resizing. - - \o Compile errors with Intel C++ Compiler.\br - There seems to be a bug in the Intel compiler with respect to - over-agressive inlining of code. - The problem will manifest itself during the link phase of QtGui where - it fails with the error that it cannot find QObjectData::~QObjectData(). - See \l{http://bugreports.qt.nokia.com/browse/QTBUG-5145} for updates on this - bug. - Also, due to some bugs in WebKit, the QtScript and QtWebKit modules - will not compile. - See \l{http://bugreports.qt.nokia.com/browse/QTBUG-6297} for a - workaround for QtScript. - - \o Compile errors with Microsoft Visual C++ compiler. \br - There seems to be a bug in the Microsoft compiler when compiling with O2 - optimization level in 64 bit. - This problem will result in crashes in QAbstractItemView::viewOptions(). - See \l{http://bugreports.qt.nokia.com/browse/QTBUG-11445} for updates on this - bug. - - - \endlist - - \section2 Mac OS X - - \list - - \o If a sheet is opened for a given window, clicking the title bar of that - window will cause it to flash. This behavior has been reported to Apple - (bug number 5827676). - - \endlist - - \section2 Symbian - - \list - \o Check known issues for Symbian at - \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} {Known Issues Wiki}. \endlist */ -- cgit v0.12 From fe0319a84082cb97a2007ca82af153a785a0938e Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 6 Oct 2010 13:11:33 +0200 Subject: Doc: Fixing spacing bug in columns --- doc/src/template/style/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index c07385c..3dcea96 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -982,7 +982,7 @@ min-width:250px; line-height: 1.2; min-width:100%; - + min-height:15px; } .flowList dd a{ -- cgit v0.12 From 64b2aba90b86a62be961dc7fc77aa6b37915e144 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 6 Oct 2010 13:44:27 +0200 Subject: Added installation section and fixed some whitespace. Reviewed-by: David Boddie --- doc/src/getting-started/gettingstartedqml.qdoc | 82 +++++++++++++++----------- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index c7c73e9..0da8f53 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -35,6 +35,16 @@ After reading this guide, you should be ready to develop your own applications using QML and Qt C++. + \section1 Installation + + First, we would need to install the latest version of Qt that includes \l{Qt + Quick}, which is Qt 4.7. The \l{Installation} {installation} guide contains + installation instructions and requirements for different platforms. + + Qt Quick includes a declarative language called + \l{Introduction to the QML language}{QML}, the \l{QtDeclarative Module}, and + \l{QML Viewer}. + \section1 QML to Build User Interfaces The application we are building is a simple text editor that will load, save, @@ -68,8 +78,8 @@ We start our text editor by building a button. Functionally, a button has a mouse sensitive area and a label. Buttons perform actions when a user presses the button. - In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The - \c Rectangle element has properties to control the element's appearance and location. + In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The + \c Rectangle element has properties to control the element's appearance and location. \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document @@ -88,7 +98,7 @@ \c text property. The label is contained within the Rectangle and in order to center it in the middle, we assign the \c anchors of the Text element to its parent, which is called \c simplebutton. Anchors may bind to other items' anchors, allowing layout - assignments simpler. + assignments simpler. We shall save this code as \c SimpleButton.qml. Running qmlviewer with the file as the argument will display the grey rectangle with a text label. @@ -104,7 +114,7 @@ id:simplebutton ... - MouseArea{ + MouseArea{ id: buttonMouseArea anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors @@ -126,7 +136,7 @@ whenever the acceptable mouse button is clicked, the left click being the default. We can bind actions to the onClicked handler. In our example, \c console.log() outputs text whenever the mouse area is clicked. The function \c console.log() is a useful tool for - debugging purposes and for outputting text. + debugging purposes and for outputting text. The code in \c SimpleButton.qml is sufficient to display a button on the screen and output text whenever it is clicked with a mouse. @@ -136,7 +146,7 @@ id:Button ... - property color buttonColor: "lightblue" + property color buttonColor: "lightblue" property color onHoverColor: "gold" property color borderColor: "white" @@ -145,8 +155,8 @@ console.log(buttonLabel.text + " clicked" ) } - MouseArea{ - onClicked: buttonClick() + MouseArea{ + onClicked: buttonClick() hoverEnabled: true onEntered: parent.border.color = onHoverColor onExited: parent.border.color = borderColor @@ -210,12 +220,12 @@ \code import QtQuick 1.0 \\import the main Qt QML module - import "folderName" \\import the contents of the folder + import "folderName" \\import the contents of the folder import "script.js" as Script \\import a Javascript file and name it as Script \endcode The syntax shown above shows how to use the \c import keyword. This is required to - use JavaScript files, or QML files that are not within the same directory. Since + use JavaScript files, or QML files that are not within the same directory. Since \c Button.qml is in the same directory as \c FileMenu.qml, we do not need to import the \c Button.qml file to use it. We can directly create a \c Button element by declaring \c Button{}, similar to a \c Rectangle{} declaration. @@ -242,7 +252,7 @@ label: "Exit" buttonColor: "darkgrey" - onButtonClick: Qt.quit() + onButtonClick: Qt.quit() } } \endcode @@ -266,7 +276,7 @@ The declaration of the edit menu is very similar at this stage. The menu has buttons that have the labels: \c Copy, \c Paste, and \c {Select All}. - \image qml-texteditor1_editmenu.png + \image qml-texteditor1_editmenu.png Armed with our knowledge of importing and customizing previously made components, we may now combine these menu pages to create a menu bar, @@ -333,7 +343,7 @@ //control the movement of the menu switching snapMode: ListView.SnapOneItem orientation: ListView.Horizontal - boundsBehavior: Flickable.StopAtBounds + boundsBehavior: Flickable.StopAtBounds flickDeceleration: 5000 highlightFollowsCurrentItem: true highlightMoveDuration:240 @@ -346,7 +356,7 @@ code above sets \c Flickable properties to create the desired flicking movement to our view. In particular,the property \c highlightMoveDuration changes the duration of the flick transition. A higher \c highlightMoveDuration value - results in slower menu switching. + results in slower menu switching. The \c ListView maintains the model items through an \c index and each visual item in the model is accessible through the \c index, in the order of the @@ -380,7 +390,7 @@ id: editButton label: "Edit" ... - onButtonClick: menuListView.currentIndex = 1 + onButtonClick: menuListView.currentIndex = 1 } } } @@ -389,7 +399,7 @@ The menu bar we just created can be flicked to access the menus or by clicking on the menu names at the top. Switching menu screens feel intuitive and responsive. - \image qml-texteditor2_menubar.png + \image qml-texteditor2_menubar.png \section1 Building a Text Editor @@ -402,7 +412,7 @@ \code TextEdit{ - id: textEditor + id: textEditor anchors.fill:parent width:parent.width; height:parent.height color:"midnightblue" @@ -475,14 +485,14 @@ that already have defined behaviors. Using this approach, application layouts and UI components can be created easily. - \image qml-texteditor3_texteditor.png + \image qml-texteditor3_texteditor.png \section1 Decorating the Text Editor \section2 Implementing a Drawer Interface Our text editor looks simple and we need to decorate it. Using QML, we can declare transitions and animate our text editor. Our menu bar is occupying one-third of the - screen and it would be nice to have it only appear when we want it. + screen and it would be nice to have it only appear when we want it. We can add a drawer interface, that will contract or expand the menu bar when clicked. In our implementation, we have a thin rectangle that responds to mouse clicks. The @@ -537,7 +547,7 @@ the item's \c transitions property. Our text editor has a state transition whenever the state changes to either \c DRAWER_OPEN or \c DRAWER_CLOSED. Importantly, the transition needs a \c from and a \c to state but for our transitions, we can use - the wild card \c * symbol to denote that the transition applies to all state changes. + the wild card \c * symbol to denote that the transition applies to all state changes. During transitions, we can assign animations to the property changes. Our \c menuBar switches position from \c {y:0} to \c {y:-partition} and we can animate @@ -561,7 +571,7 @@ Behavior{ NumberAnimation{property: "rotation";easing.type: Easing.OutExpo } - } + } \endcode Going back to our components with knowledge of states and animations, we can improve @@ -607,9 +617,9 @@ We are finished building the user interface of a very simple text editor. Going forward, the user interface is complete, and we can implement the application logic using regular Qt and C++. QML works nicely as a prototyping - tool, separating the application logic away from the UI design. + tool, separating the application logic away from the UI design. - \image qml-texteditor4_texteditor.png + \image qml-texteditor4_texteditor.png \section2 Extending QML using Qt C++ @@ -622,7 +632,7 @@ we shall implement the load and save functions in C++ and export it as a plugin. This way, we only need to load the QML file directly instead of running an executable. - \section3 Exposing C++ Classes to QML + \section3 Exposing C++ Classes to QML We will be implementing file loading and saving using Qt and C++. C++ classes and functions can be used in QML by registering them. The class also needs to be @@ -762,7 +772,7 @@ Similarly, we have the other properties declared according to their uses. The \c filesCount property indicates the number of files in a directory. The filename property is set to the currently selected file's name and the loaded/saved file - content is stored in \c fileContent property. + content is stored in \c fileContent property. \code Q_PROPERTY(QDeclarativeListProperty files READ files CONSTANT ) @@ -811,10 +821,10 @@ Regular C++ functions are also accessible from QML. The file loading and saving functions are implemented in C++ and declared using the \l {Q_INVOKABLE}{Q_INVOKABLE} macro. Alternatively, we can declare the functions - as a \c slot and the functions will be accessible from QML. + as a \c slot and the functions will be accessible from QML. \code - In Directory.h: + In Directory.h: Q_INVOKABLE void saveFile(); Q_INVOKABLE void loadFile(); @@ -848,9 +858,9 @@ The constructor passes pointers to functions that will append the list, count the list, retrieve the item using an index, and empty the list. Only the append function is mandatory. Note that the function pointers must match the definition - of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction}, - \l {QDeclarativeListProperty::CountFunction}{CountFunction}, - \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or + of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction}, + \l {QDeclarativeListProperty::CountFunction}{CountFunction}, + \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or \l {QDeclarativeListProperty::ClearFunction}{ClearFunction}. \code @@ -883,7 +893,7 @@ plugins and other resources. \code - In qmldir: + In qmldir: Button ./Button.qml FileDialog ./FileDialog.qml @@ -895,7 +905,7 @@ \endcode The plugin we just created is called \c FileDialog, as indicated by the - \c TARGET field in the project file. The compiled plugin is in the \c plugins directory. + \c TARGET field in the project file. The compiled plugin is in the \c plugins directory. \section3 Integrating a File Dialog into the File Menu @@ -910,7 +920,7 @@ \c FileDialog element that the directory refreshed its contents. This notification is performed in the signal handler, \c onDirectoryChanged. - \code + \code In FileMenu.qml: Directory{ @@ -922,7 +932,7 @@ Keeping with the simplicity of our application, the file dialog will always be visible and will not display invalid text files, which do not have a \c .txt - extension to their filenames. + extension to their filenames. \code In FileDialog.qml: @@ -981,10 +991,10 @@ will transfer the text from the \c TextEdit onto the directory's \c fileContent property, then copy its file name from the editable text input. Finally, the button calls the \c saveFile() function, saving the file. The \c loadButton has a similar - execution. Also, the \c New action will empty the contents of the \c TextEdit. + execution. Also, the \c New action will empty the contents of the \c TextEdit. Further, the \c EditMenu buttons are connected to the \c TextEdit functions to copy, - paste, and select all the text in the text editor. + paste, and select all the text in the text editor. \image qml-texteditor5_filemenu.png -- cgit v0.12 From f6d9c3f0dd014c409c43150b3a10866f47ea54a6 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 6 Oct 2010 14:13:02 +0200 Subject: Clarified the auto connect enumeration regarding which type of connection is made. Task-number: QTBUG-14223 Reviewed-by: David Boddie --- src/corelib/global/qnamespace.qdoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index ad0ffd7..32e85db 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -511,9 +511,11 @@ delivery at a later time. \value AutoConnection - (default) Same as DirectConnection, if the emitter and - receiver are in the same thread. Same as QueuedConnection, - if the emitter and receiver are in different threads. + (default) If the object sending the signal is in a different thread + than the receiving object, the signal is queued, behaving as + Qt::QueuedConnection. If both objects are in the same thread, + the slot is invoked directly, behaving as Qt::DirectConnection. The + type of connection is determined when the signal is emitted. \value DirectConnection The slot is invoked immediately, when the signal is -- cgit v0.12 From 8f82eb0dd996fe312192199b11abbba2b01943f0 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 6 Oct 2010 15:17:57 +0200 Subject: Added a project file for the Getting Started with QML and changed the old file name references. --- doc/src/getting-started/gettingstartedqml.qdoc | 4 ++-- .../gettingStarted/gsQml/filedialog/cppPlugins.pro | 17 ----------------- .../gettingStarted/gsQml/filedialog/filedialog.pro | 17 +++++++++++++++++ examples/tutorials/gettingStarted/gsQml/texteditor.pro | 4 ++++ 4 files changed, 23 insertions(+), 19 deletions(-) delete mode 100644 examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro create mode 100644 examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro create mode 100644 examples/tutorials/gettingStarted/gsQml/texteditor.pro diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 0ebb448..065628a 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -655,7 +655,7 @@ directory. \code - In cppPlugins.pro: + In filedialog.pro: TEMPLATE = lib CONFIG += qt plugin @@ -881,7 +881,7 @@ text files is in the application directory, get the file's name and content as a string, and be notified whenever there are changes in the directory contents. - To build the plugin, run \c qmake on the \c cppPlugins.pro project file, then run + To build the plugin, run \c qmake on the \c filedialog.pro project file, then run \c make to build and transfer the plugin to the \c plugins directory. diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro b/examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro deleted file mode 100644 index d85787d..0000000 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro +++ /dev/null @@ -1,17 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative - -DESTDIR += ../plugins -OBJECTS_DIR = tmp -MOC_DIR = tmp - -TARGET = FileDialog - -HEADERS += directory.h \ - file.h \ - dialogPlugin.h - -SOURCES += directory.cpp \ - file.cpp \ - dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro new file mode 100644 index 0000000..d85787d --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro @@ -0,0 +1,17 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative + +DESTDIR += ../plugins +OBJECTS_DIR = tmp +MOC_DIR = tmp + +TARGET = FileDialog + +HEADERS += directory.h \ + file.h \ + dialogPlugin.h + +SOURCES += directory.cpp \ + file.cpp \ + dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.pro b/examples/tutorials/gettingStarted/gsQml/texteditor.pro new file mode 100644 index 0000000..aa5306c --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/texteditor.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = \ + filedialog\ + -- cgit v0.12 From 1c23776a78801d9466fa85af36919125de12a77f Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Wed, 6 Oct 2010 16:06:23 +0200 Subject: Doc: Fix broken links in QSslConfiguration Task-number: QTBUG-14213 Reviewed-by: David Boddie --- src/network/ssl/qsslconfiguration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index f8f67bb..1760b53 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -485,9 +485,10 @@ void QSslConfiguration::setCiphers(const QList &ciphers) /*! Returns this connection's CA certificate database. The CA certificate database is used by the socket during the handshake phase to - validate the peer's certificate. It can be moodified prior to the - handshake with addCaCertificate(), addCaCertificates(), and - setCaCertificates(). + validate the peer's certificate. It can be modified prior to the + handshake with setCaCertificates(), or with \l{QSslSocket}'s + \l{QSslSocket::}{addCaCertificate()} and + \l{QSslSocket::}{addCaCertificates()}. \sa setCaCertificates() */ -- cgit v0.12 From d0cefe5e80259f089cba73e98610a6bbf93f706a Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Wed, 6 Oct 2010 16:08:52 +0200 Subject: Doc: Fixed doc references to non-existing API Task-number: QTBUG-13632 Reviewed-by: David Boddie --- src/corelib/kernel/qabstractitemmodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 9a99ea1..6e37aee 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1336,14 +1336,13 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, layoutChanged(). In other words, when the structure changes: \list - \o Call beginLayoutChanged() + \o emit layoutAboutToBeChanged \o Remember the QModelIndex that will change \o Update your internal data \o Call changePersistentIndex() - \o Call endLayoutChanged() + \o emit layoutChanged \endlist - \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), modelReset(), changePersistentIndex() */ -- cgit v0.12 From d6f4a6e6be5d70e31c70415e637a6f7f312a997d Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 09:25:37 +0200 Subject: Doc: Fixing snippet bug. Path pointing to the wrong snippet --- src/corelib/tools/qelapsedtimer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp index cb5e701..ee7c9b9 100644 --- a/src/corelib/tools/qelapsedtimer.cpp +++ b/src/corelib/tools/qelapsedtimer.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE function, which can be used to determine if a certain number of milliseconds has already elapsed: - \snippet doc/src/snippets/qelapsedtimer/main.cpp 1 + \snippet doc/src/snippets/qelapsedtimer/main.cpp 2 \section1 Reference clocks -- cgit v0.12 From 86d845cf8b8dd13672c27103af7cb576a3e7a17e Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 09:28:59 +0200 Subject: Doc: Fixing typo --- doc/src/overviews.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index 7b02f1a..b9bd3b4 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -54,7 +54,7 @@ \brief The Qt components for constructing native look & feel desktop UI's. These pages are about Qt's traditional set of GUI components for - building both native look ^ feel and custom UI's for the desktop + building both native look & feel and custom UI's for the desktop environment. Use \l{Qt Quick} for building UI's for mobile devices. \generatelist {related} -- cgit v0.12 From 08ba207866358e95d320749da5aac0514a9db5a6 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 09:36:30 +0200 Subject: Doc: Fixing bug - line too long and not visible. Breaking the line in two --- examples/declarative/i18n/i18n.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml index 8dac88d..219deda 100644 --- a/examples/declarative/i18n/i18n.qml +++ b/examples/declarative/i18n/i18n.qml @@ -65,7 +65,8 @@ Rectangle { anchors.fill: parent; spacing: 20 Text { - text: "If a translation is available for the system language (eg. French) then the string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'." + text: "If a translation is available for the system language (eg. French) then the + string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'." width: parent.width; wrapMode: Text.WordWrap } -- cgit v0.12 From 51633dc7aadae91ade11c4e28947f739c59c10a4 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 10:19:30 +0200 Subject: Doc: correcting typo --- doc/src/howtos/unix-signal-handlers.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/howtos/unix-signal-handlers.qdoc b/doc/src/howtos/unix-signal-handlers.qdoc index fe01772..ca34bfb 100644 --- a/doc/src/howtos/unix-signal-handlers.qdoc +++ b/doc/src/howtos/unix-signal-handlers.qdoc @@ -78,7 +78,7 @@ In your Unix signal handlers, you write a byte to the \e write end of a socket pair and return. This will cause the corresponding QSocketNotifier to emit its activated() signal, which will in turn - cause the appropriate Qt slott function to run. + cause the appropriate Qt slot function to run. \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 3 -- cgit v0.12 From b16ac8de0633b6c10574a0c5bfda479729b99925 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 10:39:50 +0200 Subject: Doc: adding note to function QWSKeyboardHandler::processKeycode - that it was added in Qt 4.6 --- src/gui/embedded/qkbd_qws.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/embedded/qkbd_qws.cpp b/src/gui/embedded/qkbd_qws.cpp index b28e293..a6c8002 100644 --- a/src/gui/embedded/qkbd_qws.cpp +++ b/src/gui/embedded/qkbd_qws.cpp @@ -450,6 +450,8 @@ void QWSKeyboardHandler::endAutoRepeat() /*! \fn QWSKeyboardHandler::KeycodeAction QWSKeyboardHandler::processKeycode(quint16 keycode, bool isPress, bool autoRepeat) + \since 4.6 + Maps \a keycode according to a keymap and sends that key event to the \l{Qt for Embedded Linux} server application. -- cgit v0.12 From 21c14e8de6b7e5a5a8bbc4424227e7103605f948 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 10:50:51 +0200 Subject: Doc: correcting broken link to labs --- doc/src/development/qtestlib.qdoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc index 23d6670..cc5afd2 100644 --- a/doc/src/development/qtestlib.qdoc +++ b/doc/src/development/qtestlib.qdoc @@ -749,9 +749,10 @@ \section1 External Tools Tools for handling and visualizing test data are available as part of - the \l{qtestlib-tools} project on the Qt Labs Web site. These include - a tool for comparing performance data obtained from test runs and a - utility to generate Web-based graphs of performance data. + the qtestlib-tools project on the + \l{http://labs.qt.nokia.com/}{http://labs.qt.nokia.com/}Qt Labs Web site. + These include a tool for comparing performance data obtained from test + runs and a utility to generate Web-based graphs of performance data. See the \l{qtestlib-tools Announcement} for more information on these tools and a simple graphing example. -- cgit v0.12 From b65a598e0c580585bd16babfd46967b0f4cf8931 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 10:54:38 +0200 Subject: Doc: correcting grammar on the installation pages --- doc/src/getting-started/installation.qdoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 3eb761d..c6e79d9 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -392,10 +392,10 @@ must be run as root. */ /*! \page install-wince.html -\title Installing Qt on Windows CE +\title Installing Qt for Windows CE \ingroup installation \ingroup qtce -\brief How to install Qt on Windows CE. +\brief How to install Qt for Windows CE. \previouspage Installation \tableofcontents @@ -492,9 +492,9 @@ in the \l{Qt for Windows CE Requirements} document. */ /*! \page install-Symbian-installer.html -\title Installing Qt on the Symbian platform from a Binary Package +\title Installing Qt for the Symbian platform from a Binary Package \ingroup qtsymbian -\brief How to install Qt on the Symbian platform from a binary package. +\brief How to install Qt for the Symbian platform from a binary package. \previouspage Installation \tableofcontents @@ -551,10 +551,10 @@ Symbian platform, */ /*! \page install-Symbian.html -\title Installing Qt on the Symbian platform +\title Installing Qt for the Symbian platform \ingroup installation \ingroup qtsymbian -\brief How to install Qt on the Symbian platform. +\brief How to install Qt for the Symbian platform. \previouspage Installation \tableofcontents @@ -685,10 +685,10 @@ Binary Package} document. */ /*! \page install-Symbian-linux.html -\title Installing Qt on the Symbian platform using Linux (experimental) +\title Installing Qt for the Symbian platform using Linux (experimental) \ingroup installation \ingroup qtsymbian -\brief How to install Qt on the Symbian platform using Linux. +\brief How to install Qt for the Symbian platform using Linux. \previouspage Installation \tableofcontents -- cgit v0.12 From d6369f9faa28c40c4e7dd002b07556d3f730a858 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 10:58:49 +0200 Subject: Doc: correcting spelling - qdbusxml2dcpp to qdbusxml2cpp --- tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp index d9343e3..a259096 100644 --- a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -1130,11 +1130,11 @@ int main(int argc, char **argv) static code representing those interfaces, which can then be used to make calls to remote objects or implement said interfaces. - \c qdbusxml2dcpp has two modes of operation, that correspond to the two possible outputs it can + \c qdbusxml2cpp has two modes of operation, that correspond to the two possible outputs it can produce: the interface (proxy) class or the adaptor class. The latter consists of both a C++ header and a source file, which are meant to be edited and adapted to your needs. - The \c qdbusxml2dcpp tool is not meant to be run every time you compile your + The \c qdbusxml2cpp tool is not meant to be run every time you compile your application. Instead, it's meant to be used when developing the code or when the interface changes. -- cgit v0.12 From 1fef5048ba6bf9a55985103c28fea3a74bf558d2 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 11:07:04 +0200 Subject: Doc: correct spelling --- doc/src/examples/basiclayouts.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc index 1ecf394..cbc9297 100644 --- a/doc/src/examples/basiclayouts.qdoc +++ b/doc/src/examples/basiclayouts.qdoc @@ -66,7 +66,7 @@ horizontal layout. Next we use the \c createGridGroupBox() function to create a group box containing several line edits and a small text editor which are displayed in a grid layout. Finally, we use the - \c createFormGroupBox() function to createa a group box with + \c createFormGroupBox() function to create a group box with three labels and three input fields: a line edit, a combo box and a spin box. -- cgit v0.12 From 8c8bfec2083e10bc9869940c1b91b6e7897ab9d8 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 11:12:18 +0200 Subject: Doc: correcting bug - lenght() pointed to setLength() in "See also" section. Correct link is resize() --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d1060d2..ff9d877 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -4275,7 +4275,7 @@ QString& QString::fill(QChar ch, int size) Returns the number of characters in this string. Equivalent to size(). - \sa setLength() + \sa resize() */ /*! -- cgit v0.12 From 8b80b6e87f187f2066cfba0123dbfd8948e9e220 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 11:37:38 +0200 Subject: Doc: Correcting Windows CE 6.0 to Windows Embedded CE 6.0 --- doc/src/platforms/supported-platforms.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index e7de4c3..31866c4 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -115,8 +115,8 @@ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)} \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) - \row \o Windows CE 6.0 (ARMv4i, x86, MIPS) - \o MSVC 2008 WinCE 6.0 Professional + \row \o Windows Embedded CE 6.0 (ARMv4i, x86, MIPS) + \o MSVC 2008 WinCE Embedded 6.0 Professional \row \o Maemo 5(Linux, ARM, X11) \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)} \row \o Symbian (Symbian/S60 3.1, 3.2) -- cgit v0.12 From 93b40aa12270714abe722bbc4e47166f5a47bdf4 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 7 Oct 2010 14:06:53 +0200 Subject: qdoc: Don't generate html output for png files. --- tools/qdoc3/pagegenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index a187c2e..37dc191 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -310,10 +310,10 @@ PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) const FakeNode *fakeNode = static_cast(node); if (fakeNode->subType() == Node::ExternalPage) return; -#ifdef QDOC_QML + if (fakeNode->subType() == Node::Image) + return; if (fakeNode->subType() == Node::QmlPropertyGroup) return; -#endif if (fakeNode->subType() == Node::Page) { if (node->count() > 0) qDebug("PAGE %s HAS CHILDREN", qPrintable(fakeNode->title())); -- cgit v0.12 From 0f9d642e105da1644f4ed846a696510f9a9f1daf Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 7 Oct 2010 21:23:14 +0200 Subject: Doc: tuning search reasult box --- doc/src/template/style/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 3dcea96..ec0202a 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -664,6 +664,7 @@ #resultdialog.active { display: block; + width:30%; } #resultdialog #resultclose { -- cgit v0.12