Changeset 561 for trunk/examples/xml


Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
36 edited
9 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/examples/xml/dombookmarks/dombookmarks.pro

    r2 r561  
    1212INSTALLS += target sources
    1313
     14symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
     15
    1416wince*: {
    1517     addFiles.sources = frank.xbel jennifer.xbel
  • trunk/examples/xml/dombookmarks/frank.xbel

    r2 r561  
    7272        <folder folded="no">
    7373            <title>Qt</title>
    74             <bookmark href="http://doc.trolltech.com/2.3/">
     74            <bookmark href="http://qt.nokia.com/doc/2.3/">
    7575                <title>Qt 2.3 Reference</title>
    7676            </bookmark>
    77             <bookmark href="http://doc.trolltech.com/3.3/">
     77            <bookmark href="http://qt.nokia.com/doc/3.3/">
    7878                <title>Qt 3.3 Reference</title>
    7979            </bookmark>
    80             <bookmark href="http://doc.trolltech.com/4.0/">
     80            <bookmark href="http://qt.nokia.com/doc/4.0/">
    8181                <title>Qt 4.0 Reference</title>
    8282            </bookmark>
    83             <bookmark href="http://qtsoftware.com/">
    84                 <title>Trolltech Home Page</title>
     83            <bookmark href="http://qt.nokia.com/">
     84                <title>Qt Home Page</title>
    8585            </bookmark>
    8686        </folder>
  • trunk/examples/xml/dombookmarks/jennifer.xbel

    r2 r561  
    55        <title>Qt Resources</title>
    66        <folder folded="yes">
    7             <title>Trolltech Partners</title>
     7            <title>Qt Partners</title>
    88            <bookmark href="http://partners.trolltech.com/partners/training.html">
    99                <title>Training Partners</title>
     
    4646            </bookmark>
    4747        </folder>
    48         <bookmark href="http://doc.trolltech.com/qq/">
     48        <bookmark href="http://qt.nokia.com/doc/qq/">
    4949            <title>Qt Quarterly</title>
    5050        </bookmark>
    51         <bookmark href="http://qtsoftware.com/">
    52             <title>Trolltech's home page</title>
     51        <bookmark href="http://qt.nokia.com/">
     52            <title>Qt home page</title>
    5353        </bookmark>
    54         <bookmark href="http://doc.trolltech.com/4.0/">
     54        <bookmark href="http://qt.nokia.com/doc/4.0/">
    5555            <title>Qt 4.0 documentation</title>
    5656        </bookmark>
    57         <bookmark href="http://qtsoftware.com/developer/faqs/">
     57        <bookmark href="http://qt.nokia.com/developer/faqs/">
    5858            <title>Frequently Asked Questions</title>
    5959        </bookmark>
  • trunk/examples/xml/dombookmarks/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/dombookmarks/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    114114{
    115115    openAct = new QAction(tr("&Open..."), this);
    116     openAct->setShortcut(tr("Ctrl+O"));
     116    openAct->setShortcuts(QKeySequence::Open);
    117117    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
    118118
    119119    saveAsAct = new QAction(tr("&Save As..."), this);
    120     saveAsAct->setShortcut(tr("Ctrl+S"));
     120    saveAsAct->setShortcuts(QKeySequence::SaveAs);
    121121    connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
    122122
    123123    exitAct = new QAction(tr("E&xit"), this);
    124     exitAct->setShortcut(tr("Ctrl+Q"));
     124    exitAct->setShortcuts(QKeySequence::Quit);
    125125    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
    126126
  • trunk/examples/xml/dombookmarks/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/dombookmarks/xbeltree.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9191    clear();
    9292
    93     disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
    94                this, SLOT(updateDomElement(QTreeWidgetItem *, int)));
     93    disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
     94               this, SLOT(updateDomElement(QTreeWidgetItem*,int)));
    9595
    9696    QDomElement child = root.firstChildElement("folder");
     
    100100    }
    101101
    102     connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
    103             this, SLOT(updateDomElement(QTreeWidgetItem *, int)));
     102    connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
     103            this, SLOT(updateDomElement(QTreeWidgetItem*,int)));
    104104
    105105    return true;
  • trunk/examples/xml/dombookmarks/xbeltree.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/rsslisting/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5959{
    6060    QApplication app(argc, argv);
     61    qWarning("The usage of QHttp is not recommended anymore, please use QNetworkAccessManager.");
    6162    RSSListing *rsslisting = new RSSListing;
    6263    rsslisting->show();
  • trunk/examples/xml/rsslisting/rsslisting.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7777{
    7878    lineEdit = new QLineEdit(this);
    79     lineEdit->setText("http://labs.trolltech.com/blogs/feed");
     79    lineEdit->setText("http://labs.qt.nokia.com/blogs/feed");
    8080
    8181    fetchButton = new QPushButton(tr("Fetch"), this);
     
    8484
    8585    treeWidget = new QTreeWidget(this);
    86     connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
     86    connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
    8787            this, SLOT(itemActivated(QTreeWidgetItem*)));
    8888    QStringList headerLabels;
     
    9191    treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
    9292
    93     connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)),
    94              this, SLOT(readData(const QHttpResponseHeader &)));
    95 
    96     connect(&http, SIGNAL(requestFinished(int, bool)),
    97              this, SLOT(finished(int, bool)));
     93    connect(&http, SIGNAL(readyRead(QHttpResponseHeader)),
     94             this, SLOT(readData(QHttpResponseHeader)));
     95
     96    connect(&http, SIGNAL(requestFinished(int,bool)),
     97             this, SLOT(finished(int,bool)));
    9898
    9999    connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch()));
  • trunk/examples/xml/rsslisting/rsslisting.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/rsslisting/rsslisting.pro

    r2 r561  
    99INSTALLS += target sources
    1010
     11symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
     12
  • trunk/examples/xml/saxbookmarks/frank.xbel

    r2 r561  
    7272        <folder folded="no">
    7373            <title>Qt</title>
    74             <bookmark href="http://doc.trolltech.com/2.3/">
     74            <bookmark href="http://qt.nokia.com/doc/2.3/">
    7575                <title>Qt 2.3 Reference</title>
    7676            </bookmark>
    77             <bookmark href="http://doc.trolltech.com/3.3/">
     77            <bookmark href="http://qt.nokia.com/doc/3.3/">
    7878                <title>Qt 3.3 Reference</title>
    7979            </bookmark>
    80             <bookmark href="http://doc.trolltech.com/4.0/">
     80            <bookmark href="http://qt.nokia.com/doc/4.0/">
    8181                <title>Qt 4.0 Reference</title>
    8282            </bookmark>
    83             <bookmark href="http://qtsoftware.com/">
    84                 <title>Trolltech Home Page</title>
     83            <bookmark href="http://qt.nokia.com/">
     84                <title>Qt Home Page</title>
    8585            </bookmark>
    8686        </folder>
  • trunk/examples/xml/saxbookmarks/jennifer.xbel

    r2 r561  
    55        <title>Qt Resources</title>
    66        <folder folded="yes">
    7             <title>Trolltech Partners</title>
     7            <title>Qt Partners</title>
    88            <bookmark href="http://partners.trolltech.com/partners/training.html">
    99                <title>Training Partners</title>
     
    4646            </bookmark>
    4747        </folder>
    48         <bookmark href="http://doc.trolltech.com/qq/">
     48        <bookmark href="http://qt.nokia.com/doc/qq/">
    4949            <title>Qt Quarterly</title>
    5050        </bookmark>
    51         <bookmark href="http://qtsoftware.com/">
    52             <title>Trolltech's home page</title>
     51        <bookmark href="http://qt.nokia.com/">
     52            <title>qt home page</title>
    5353        </bookmark>
    54         <bookmark href="http://doc.trolltech.com/4.0/">
     54        <bookmark href="http://qt.nokia.com/doc/4.0/">
    5555            <title>Qt 4.0 documentation</title>
    5656        </bookmark>
    57         <bookmark href="http://qtsoftware.com/developer/faqs/">
     57        <bookmark href="http://qt.nokia.com/developer/faqs/">
    5858            <title>Frequently Asked Questions</title>
    5959        </bookmark>
  • trunk/examples/xml/saxbookmarks/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4848    QApplication app(argc, argv);
    4949    MainWindow mainWin;
     50#if defined(Q_OS_SYMBIAN)
     51    mainWin.showFullScreen();
     52#else
    5053    mainWin.show();
     54#endif
    5155    mainWin.open();
    5256    return app.exec();
  • trunk/examples/xml/saxbookmarks/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6767void MainWindow::open()
    6868{
     69#if defined(Q_OS_SYMBIAN)
     70    // Look for bookmarks on the same drive where the application is installed to,
     71    // if drive is not read only. QDesktopServices::DataLocation does this check,
     72    // and returns writable drive.
     73    QString bookmarksFolder =
     74            QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
     75    bookmarksFolder.append(":/Data/qt/saxbookmarks");
     76    QDir::setCurrent(bookmarksFolder);
     77#endif
    6978    QString fileName =
    7079            QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
     
    129138{
    130139    openAct = new QAction(tr("&Open..."), this);
    131     openAct->setShortcut(tr("Ctrl+O"));
     140    openAct->setShortcuts(QKeySequence::Open);
    132141    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
    133142
    134143    saveAsAct = new QAction(tr("&Save As..."), this);
    135     saveAsAct->setShortcut(tr("Ctrl+S"));
     144    saveAsAct->setShortcuts(QKeySequence::SaveAs);
    136145    connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
    137146
    138147    exitAct = new QAction(tr("E&xit"), this);
    139     exitAct->setShortcut(tr("Ctrl+Q"));
     148    exitAct->setShortcuts(QKeySequence::Quit);
    140149    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
    141150
  • trunk/examples/xml/saxbookmarks/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/saxbookmarks/saxbookmarks.pro

    r2 r561  
    1919     DEPLOYMENT += addFiles
    2020}
     21
     22symbian: {
     23     TARGET.UID3 = 0xA000C60A
     24     include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
     25     addFiles.sources = frank.xbel jennifer.xbel
     26     addFiles.path = /data/qt/saxbookmarks
     27     DEPLOYMENT += addFiles
     28}
  • trunk/examples/xml/saxbookmarks/xbelgenerator.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/saxbookmarks/xbelgenerator.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/saxbookmarks/xbelhandler.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/saxbookmarks/xbelhandler.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/streambookmarks/frank.xbel

    r2 r561  
    7272        <folder folded="no">
    7373            <title>Qt</title>
    74             <bookmark href="http://doc.trolltech.com/2.3/">
     74            <bookmark href="http://qt.nokia.com/doc/2.3/">
    7575                <title>Qt 2.3 Reference</title>
    7676            </bookmark>
    77             <bookmark href="http://doc.trolltech.com/3.3/">
     77            <bookmark href="http://qt.nokia.com/doc/3.3/">
    7878                <title>Qt 3.3 Reference</title>
    7979            </bookmark>
    80             <bookmark href="http://doc.trolltech.com/4.0/">
     80            <bookmark href="http://qt.nokia.com/doc/4.0/">
    8181                <title>Qt 4.0 Reference</title>
    8282            </bookmark>
    83             <bookmark href="http://qtsoftware.com/">
    84                 <title>Trolltech Home Page</title>
     83            <bookmark href="http://qt.nokia.com/">
     84                <title>Qt Home Page</title>
    8585            </bookmark>
    8686        </folder>
  • trunk/examples/xml/streambookmarks/jennifer.xbel

    r2 r561  
    55        <title>Qt Resources</title>
    66        <folder folded="yes">
    7             <title>Trolltech Partners</title>
     7            <title>Qt Partners</title>
    88            <bookmark href="http://partners.trolltech.com/partners/training.html">
    99                <title>Training Partners</title>
     
    4646            </bookmark>
    4747        </folder>
    48         <bookmark href="http://doc.trolltech.com/qq/">
     48        <bookmark href="http://qt.nokia.com/doc/qq/">
    4949            <title>Qt Quarterly</title>
    5050        </bookmark>
    51         <bookmark href="http://qtsoftware.com/">
    52             <title>Trolltech's home page</title>
     51        <bookmark href="http://qt.nokia.com/">
     52            <title>Qt home page</title>
    5353        </bookmark>
    54         <bookmark href="http://doc.trolltech.com/4.0/">
     54        <bookmark href="http://qt.nokia.com/doc/4.0/">
    5555            <title>Qt 4.0 documentation</title>
    5656        </bookmark>
    57         <bookmark href="http://qtsoftware.com/developer/faqs/">
     57        <bookmark href="http://qt.nokia.com/developer/faqs/">
    5858            <title>Frequently Asked Questions</title>
    5959        </bookmark>
  • trunk/examples/xml/streambookmarks/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/streambookmarks/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9292    if (!reader.read(&file)) {
    9393        QMessageBox::warning(this, tr("QXmlStream Bookmarks"),
    94                              tr("Parse error in file %1 at line %2, column %3:\n%4")
     94                             tr("Parse error in file %1:\n\n%2")
    9595                             .arg(fileName)
    96                              .arg(reader.lineNumber())
    97                              .arg(reader.columnNumber())
    9896                             .arg(reader.errorString()));
    9997    } else {
     
    142140{
    143141    openAct = new QAction(tr("&Open..."), this);
    144     openAct->setShortcut(tr("Ctrl+O"));
     142    openAct->setShortcuts(QKeySequence::Open);
    145143    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
    146144
    147145    saveAsAct = new QAction(tr("&Save As..."), this);
    148     saveAsAct->setShortcut(tr("Ctrl+S"));
     146    saveAsAct->setShortcuts(QKeySequence::SaveAs);
    149147    connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
    150148
    151149    exitAct = new QAction(tr("E&xit"), this);
    152     exitAct->setShortcut(tr("Ctrl+Q"));
     150    exitAct->setShortcuts(QKeySequence::Quit);
    153151    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
    154152
  • trunk/examples/xml/streambookmarks/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/streambookmarks/streambookmarks.pro

    r2 r561  
    1313sources.path = $$[QT_INSTALL_EXAMPLES]/xml/streambookmarks
    1414INSTALLS += target sources
     15
     16symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
  • trunk/examples/xml/streambookmarks/xbelreader.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6161bool XbelReader::read(QIODevice *device)
    6262{
    63     setDevice(device);
     63    xml.setDevice(device);
    6464
    65     while (!atEnd()) {
    66         readNext();
    67 
    68         if (isStartElement()) {
    69             if (name() == "xbel" && attributes().value("version") == "1.0")
    70                 readXBEL();
    71             else
    72                 raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
    73         }
     65    if (xml.readNextStartElement()) {
     66        if (xml.name() == "xbel" && xml.attributes().value("version") == "1.0")
     67            readXBEL();
     68        else
     69            xml.raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
    7470    }
    7571
    76     return !error();
     72    return !xml.error();
    7773}
    7874//! [1]
    7975
    8076//! [2]
    81 void XbelReader::readUnknownElement()
     77QString XbelReader::errorString() const
    8278{
    83     Q_ASSERT(isStartElement());
    84 
    85     while (!atEnd()) {
    86         readNext();
    87 
    88         if (isEndElement())
    89             break;
    90 
    91         if (isStartElement())
    92             readUnknownElement();
    93     }
     79    return QObject::tr("%1\nLine %2, column %3")
     80            .arg(xml.errorString())
     81            .arg(xml.lineNumber())
     82            .arg(xml.columnNumber());
    9483}
    9584//! [2]
     
    9887void XbelReader::readXBEL()
    9988{
    100     Q_ASSERT(isStartElement() && name() == "xbel");
     89    Q_ASSERT(xml.isStartElement() && xml.name() == "xbel");
    10190
    102     while (!atEnd()) {
    103         readNext();
    104 
    105         if (isEndElement())
    106             break;
    107 
    108         if (isStartElement()) {
    109             if (name() == "folder")
    110                 readFolder(0);
    111             else if (name() == "bookmark")
    112                 readBookmark(0);
    113             else if (name() == "separator")
    114                 readSeparator(0);
    115             else
    116                 readUnknownElement();
    117         }
     91    while (xml.readNextStartElement()) {
     92        if (xml.name() == "folder")
     93            readFolder(0);
     94        else if (xml.name() == "bookmark")
     95            readBookmark(0);
     96        else if (xml.name() == "separator")
     97            readSeparator(0);
     98        else
     99            xml.skipCurrentElement();
    118100    }
    119101}
     
    123105void XbelReader::readTitle(QTreeWidgetItem *item)
    124106{
    125     Q_ASSERT(isStartElement() && name() == "title");
     107    Q_ASSERT(xml.isStartElement() && xml.name() == "title");
    126108
    127     QString title = readElementText();
     109    QString title = xml.readElementText();
    128110    item->setText(0, title);
    129111}
     
    133115void XbelReader::readSeparator(QTreeWidgetItem *item)
    134116{
     117    Q_ASSERT(xml.isStartElement() && xml.name() == "separator");
     118
    135119    QTreeWidgetItem *separator = createChildItem(item);
    136120    separator->setFlags(item->flags() & ~Qt::ItemIsSelectable);
    137121    separator->setText(0, QString(30, 0xB7));
    138     readElementText();
     122    xml.skipCurrentElement();
    139123}
    140124//! [5]
     
    142126void XbelReader::readFolder(QTreeWidgetItem *item)
    143127{
    144     Q_ASSERT(isStartElement() && name() == "folder");
     128    Q_ASSERT(xml.isStartElement() && xml.name() == "folder");
    145129
    146130    QTreeWidgetItem *folder = createChildItem(item);
    147     bool folded = (attributes().value("folded") != "no");
     131    bool folded = (xml.attributes().value("folded") != "no");
    148132    treeWidget->setItemExpanded(folder, !folded);
    149133
    150     while (!atEnd()) {
    151         readNext();
    152 
    153         if (isEndElement())
    154             break;
    155 
    156         if (isStartElement()) {
    157             if (name() == "title")
    158                 readTitle(folder);
    159             else if (name() == "folder")
    160                 readFolder(folder);
    161             else if (name() == "bookmark")
    162                 readBookmark(folder);
    163             else if (name() == "separator")
    164                 readSeparator(folder);
    165             else
    166                 readUnknownElement();
    167         }
     134    while (xml.readNextStartElement()) {
     135        if (xml.name() == "title")
     136            readTitle(folder);
     137        else if (xml.name() == "folder")
     138            readFolder(folder);
     139        else if (xml.name() == "bookmark")
     140            readBookmark(folder);
     141        else if (xml.name() == "separator")
     142            readSeparator(folder);
     143        else
     144            xml.skipCurrentElement();
    168145    }
    169146}
     
    171148void XbelReader::readBookmark(QTreeWidgetItem *item)
    172149{
    173     Q_ASSERT(isStartElement() && name() == "bookmark");
     150    Q_ASSERT(xml.isStartElement() && xml.name() == "bookmark");
    174151
    175152    QTreeWidgetItem *bookmark = createChildItem(item);
     
    177154    bookmark->setIcon(0, bookmarkIcon);
    178155    bookmark->setText(0, QObject::tr("Unknown title"));
    179     bookmark->setText(1, attributes().value("href").toString());
    180     while (!atEnd()) {
    181         readNext();
     156    bookmark->setText(1, xml.attributes().value("href").toString());
    182157
    183         if (isEndElement())
    184             break;
    185 
    186         if (isStartElement()) {
    187             if (name() == "title")
    188                 readTitle(bookmark);
    189             else
    190                 readUnknownElement();
    191         }
     158    while (xml.readNextStartElement()) {
     159        if (xml.name() == "title")
     160            readTitle(bookmark);
     161        else
     162            xml.skipCurrentElement();
    192163    }
    193164}
     
    201172        childItem = new QTreeWidgetItem(treeWidget);
    202173    }
    203     childItem->setData(0, Qt::UserRole, name().toString());
     174    childItem->setData(0, Qt::UserRole, xml.name().toString());
    204175    return childItem;
    205176}
  • trunk/examples/xml/streambookmarks/xbelreader.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5252
    5353//! [0]
    54 class XbelReader : public QXmlStreamReader
     54class XbelReader
    5555{
    5656public:
     
    6161    bool read(QIODevice *device);
    6262
     63    QString errorString() const;
     64
    6365private:
    6466//! [2]
    65     void readUnknownElement();
    6667    void readXBEL();
    6768    void readTitle(QTreeWidgetItem *item);
     
    7273    QTreeWidgetItem *createChildItem(QTreeWidgetItem *item);
    7374
     75    QXmlStreamReader xml;
    7476    QTreeWidget *treeWidget;
    7577//! [2]
  • trunk/examples/xml/streambookmarks/xbelwriter.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4848    : treeWidget(treeWidget)
    4949{
    50     setAutoFormatting(true);
     50    xml.setAutoFormatting(true);
    5151}
    5252//! [0]
     
    5555bool XbelWriter::writeFile(QIODevice *device)
    5656{
    57     setDevice(device);
     57    xml.setDevice(device);
    5858
    59     writeStartDocument();
    60     writeDTD("<!DOCTYPE xbel>");
    61     writeStartElement("xbel");
    62     writeAttribute("version", "1.0");
     59    xml.writeStartDocument();
     60    xml.writeDTD("<!DOCTYPE xbel>");
     61    xml.writeStartElement("xbel");
     62    xml.writeAttribute("version", "1.0");
    6363    for (int i = 0; i < treeWidget->topLevelItemCount(); ++i)
    6464        writeItem(treeWidget->topLevelItem(i));
    6565
    66     writeEndDocument();
     66    xml.writeEndDocument();
    6767    return true;
    6868}
     
    7575    if (tagName == "folder") {
    7676        bool folded = !treeWidget->isItemExpanded(item);
    77         writeStartElement(tagName);
    78         writeAttribute("folded", folded ? "yes" : "no");
    79         writeTextElement("title", item->text(0));
     77        xml.writeStartElement(tagName);
     78        xml.writeAttribute("folded", folded ? "yes" : "no");
     79        xml.writeTextElement("title", item->text(0));
    8080        for (int i = 0; i < item->childCount(); ++i)
    8181            writeItem(item->child(i));
    82         writeEndElement();
     82        xml.writeEndElement();
    8383    } else if (tagName == "bookmark") {
    84         writeStartElement(tagName);
     84        xml.writeStartElement(tagName);
    8585        if (!item->text(1).isEmpty())
    86             writeAttribute("href", item->text(1));
    87         writeTextElement("title", item->text(0));
    88         writeEndElement();
     86            xml.writeAttribute("href", item->text(1));
     87        xml.writeTextElement("title", item->text(0));
     88        xml.writeEndElement();
    8989    } else if (tagName == "separator") {
    90         writeEmptyElement(tagName);
     90        xml.writeEmptyElement(tagName);
    9191    }
    9292}
  • trunk/examples/xml/streambookmarks/xbelwriter.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5151
    5252//! [0]
    53 class XbelWriter : public QXmlStreamWriter
     53class XbelWriter
    5454{
    5555public:
     
    5959private:
    6060    void writeItem(QTreeWidgetItem *item);
     61    QXmlStreamWriter xml;
    6162    QTreeWidget *treeWidget;
    6263};
  • trunk/examples/xml/xml.pro

    r2 r561  
    11TEMPLATE      = subdirs
    22SUBDIRS       = dombookmarks \
     3                htmlinfo \
    34                rsslisting \
    45                saxbookmarks \
    56                streambookmarks \
    67                xmlstreamlint
     8
     9symbian: SUBDIRS = htmlinfo saxbookmarks
    710
    811# install
     
    1114sources.path = $$[QT_INSTALL_EXAMPLES]/xml
    1215INSTALLS += target sources
     16
     17symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
  • trunk/examples/xml/xmlstreamlint/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the examples of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/examples/xml/xmlstreamlint/xmlstreamlint.pro

    r2 r561  
    99sources.path = $$[QT_INSTALL_EXAMPLES]/xml/xmlstreamlint
    1010INSTALLS += target sources
     11
     12symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
Note: See TracChangeset for help on using the changeset viewer.