Changeset 561 for trunk/demos/browser
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 45 edited
-
. (modified) (1 prop)
-
demos/browser/autosaver.cpp (modified) (3 diffs)
-
demos/browser/autosaver.h (modified) (3 diffs)
-
demos/browser/bookmarks.cpp (modified) (9 diffs)
-
demos/browser/bookmarks.h (modified) (3 diffs)
-
demos/browser/browser.pro (modified) (3 diffs)
-
demos/browser/browserapplication.cpp (modified) (6 diffs)
-
demos/browser/browserapplication.h (modified) (3 diffs)
-
demos/browser/browsermainwindow.cpp (modified) (17 diffs)
-
demos/browser/browsermainwindow.h (modified) (4 diffs)
-
demos/browser/chasewidget.cpp (modified) (3 diffs)
-
demos/browser/chasewidget.h (modified) (3 diffs)
-
demos/browser/cookiejar.cpp (modified) (4 diffs)
-
demos/browser/cookiejar.h (modified) (3 diffs)
-
demos/browser/data/defaultbookmarks.xbel (modified) (2 diffs)
-
demos/browser/downloadmanager.cpp (modified) (4 diffs)
-
demos/browser/downloadmanager.h (modified) (3 diffs)
-
demos/browser/edittableview.cpp (modified) (3 diffs)
-
demos/browser/edittableview.h (modified) (3 diffs)
-
demos/browser/edittreeview.cpp (modified) (3 diffs)
-
demos/browser/edittreeview.h (modified) (3 diffs)
-
demos/browser/history.cpp (modified) (16 diffs)
-
demos/browser/history.h (modified) (3 diffs)
-
demos/browser/htmls/notfound.html (modified) (1 diff)
-
demos/browser/main.cpp (modified) (3 diffs)
-
demos/browser/modelmenu.cpp (modified) (3 diffs)
-
demos/browser/modelmenu.h (modified) (3 diffs)
-
demos/browser/networkaccessmanager.cpp (modified) (5 diffs)
-
demos/browser/networkaccessmanager.h (modified) (5 diffs)
-
demos/browser/searchlineedit.cpp (modified) (6 diffs)
-
demos/browser/searchlineedit.h (modified) (3 diffs)
-
demos/browser/settings.cpp (modified) (4 diffs)
-
demos/browser/settings.h (modified) (3 diffs)
-
demos/browser/squeezelabel.cpp (modified) (3 diffs)
-
demos/browser/squeezelabel.h (modified) (3 diffs)
-
demos/browser/tabwidget.cpp (modified) (12 diffs)
-
demos/browser/tabwidget.h (modified) (3 diffs)
-
demos/browser/toolbarsearch.cpp (modified) (3 diffs)
-
demos/browser/toolbarsearch.h (modified) (3 diffs)
-
demos/browser/urllineedit.cpp (modified) (5 diffs)
-
demos/browser/urllineedit.h (modified) (3 diffs)
-
demos/browser/webview.cpp (modified) (7 diffs)
-
demos/browser/webview.h (modified) (3 diffs)
-
demos/browser/xbel.cpp (modified) (7 diffs)
-
demos/browser/xbel.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/demos/browser/autosaver.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/autosaver.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/bookmarks.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 , m_bookmarkModel(0) 74 74 { 75 connect(this, SIGNAL(entryAdded(BookmarkNode *)),75 connect(this, SIGNAL(entryAdded(BookmarkNode*)), 76 76 m_saveTimer, SLOT(changeOccurred())); 77 connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode*)),77 connect(this, SIGNAL(entryRemoved(BookmarkNode*)), 78 78 m_saveTimer, SLOT(changeOccurred())); 79 connect(this, SIGNAL(entryChanged(BookmarkNode *)),79 connect(this, SIGNAL(entryChanged(BookmarkNode*)), 80 80 m_saveTimer, SLOT(changeOccurred())); 81 81 } … … 363 363 , m_bookmarksManager(bookmarkManager) 364 364 { 365 connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode *)),366 this, SLOT(entryAdded(BookmarkNode *)));367 connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode*)),368 this, SLOT(entryRemoved(BookmarkNode *, int, BookmarkNode*)));369 connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode *)),370 this, SLOT(entryChanged(BookmarkNode *)));365 connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode*)), 366 this, SLOT(entryAdded(BookmarkNode*))); 367 connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode*)), 368 this, SLOT(entryRemoved(BookmarkNode*))); 369 connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode*)), 370 this, SLOT(entryChanged(BookmarkNode*))); 371 371 } 372 372 … … 734 734 , m_bookmarksManager(0) 735 735 { 736 connect(this, SIGNAL(activated( const QModelIndex &)),737 this, SLOT(activated( const QModelIndex &)));736 connect(this, SIGNAL(activated()), 737 this, SLOT(activated())); 738 738 setMaxRows(-1); 739 739 setHoverRole(BookmarksModel::UrlStringRole); … … 793 793 tree->header()->resizeSection(0, header); 794 794 tree->header()->setStretchLastSection(true); 795 connect(tree, SIGNAL(activated( const QModelIndex&)),795 connect(tree, SIGNAL(activated()), 796 796 this, SLOT(open())); 797 797 tree->setContextMenuPolicy(Qt::CustomContextMenu); 798 connect(tree, SIGNAL(customContextMenuRequested( const QPoint &)),799 this, SLOT(customContextMenuRequested( const QPoint &)));798 connect(tree, SIGNAL(customContextMenuRequested()), 799 this, SLOT(customContextMenuRequested())); 800 800 connect(addFolderButton, SIGNAL(clicked()), 801 801 this, SLOT(newFolder())); … … 885 885 setRootIndex(model->index(0, 0)); 886 886 connect(m_bookmarksModel, SIGNAL(modelReset()), this, SLOT(build())); 887 connect(m_bookmarksModel, SIGNAL(rowsInserted( const QModelIndex &, int,int)), this, SLOT(build()));888 connect(m_bookmarksModel, SIGNAL(rowsRemoved( const QModelIndex &, int,int)), this, SLOT(build()));889 connect(m_bookmarksModel, SIGNAL(dataChanged( const QModelIndex &, const QModelIndex &)), this, SLOT(build()));887 connect(m_bookmarksModel, SIGNAL(rowsInserted(int)), this, SLOT(build())); 888 connect(m_bookmarksModel, SIGNAL(rowsRemoved(int)), this, SLOT(build())); 889 connect(m_bookmarksModel, SIGNAL(dataChanged()), this, SLOT(build())); 890 890 setAcceptDrops(true); 891 891 } … … 957 957 button->setText(idx.data().toString()); 958 958 ModelMenu *menu = new ModelMenu(this); 959 connect(menu, SIGNAL(activated( const QModelIndex &)),960 this, SLOT(activated( const QModelIndex &)));959 connect(menu, SIGNAL(activated()), 960 this, SLOT(activated())); 961 961 menu->setModel(m_bookmarksModel); 962 962 menu->setRootIndex(idx); -
trunk/demos/browser/bookmarks.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/browser.pro
r2 r561 4 4 5 5 CONFIG += qt warn_on 6 contains(QT_BUILD_PARTS, tools): CONFIG += uitools6 contains(QT_BUILD_PARTS, tools): CONFIG += uitools 7 7 else: DEFINES += QT_NO_UITOOLS 8 9 8 10 9 11 FORMS += \ … … 79 81 QMAKE_INFO_PLIST = Info_mac.plist 80 82 TARGET = Browser 83 84 85 86 87 88 89 90 91 92 81 93 } 82 94 … … 87 99 # install 88 100 target.path = $$[QT_INSTALL_DEMOS]/browser 89 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls 101 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls 90 102 sources.path = $$[QT_INSTALL_DEMOS]/browser 91 103 INSTALLS += target sources 104 105 106 107 108 -
trunk/demos/browser/browserapplication.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 80 80 , m_localServer(0) 81 81 { 82 QCoreApplication::setOrganizationName(QLatin1String(" Trolltech"));82 QCoreApplication::setOrganizationName(QLatin1String("")); 83 83 QCoreApplication::setApplicationName(QLatin1String("demobrowser")); 84 84 QCoreApplication::setApplicationVersion(QLatin1String("0.1")); … … 206 206 directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName(); 207 207 QWebSettings::setIconDatabasePath(directory); 208 208 209 209 210 setWindowIcon(QIcon(QLatin1String(":browser.svg"))); … … 247 248 QUrl url = settings.value(QLatin1String("userStyleSheet")).toUrl(); 248 249 defaultSettings->setUserStyleSheetUrl(url); 250 251 249 252 250 253 settings.endGroup(); -
trunk/demos/browser/browserapplication.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/browsermainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 82 82 , m_reload(0) 83 83 { 84 84 85 setAttribute(Qt::WA_DeleteOnClose, true); 85 86 statusBar()->setSizeGripEnabled(true); … … 90 91 BookmarksModel *boomarksModel = BrowserApplication::bookmarksManager()->bookmarksModel(); 91 92 m_bookmarksToolbar = new BookmarksToolBar(boomarksModel, this); 92 connect(m_bookmarksToolbar, SIGNAL(openUrl( const QUrl&)),93 m_tabWidget, SLOT(loadUrlInCurrentTab( const QUrl&)));93 connect(m_bookmarksToolbar, SIGNAL(openUrl()), 94 m_tabWidget, SLOT(loadUrlInCurrentTab())); 94 95 connect(m_bookmarksToolbar->toggleViewAction(), SIGNAL(toggled(bool)), 95 96 this, SLOT(updateBookmarksToolbarActionText(bool))); … … 109 110 setCentralWidget(centralWidget); 110 111 111 connect(m_tabWidget, SIGNAL(loadPage( const QString &)),112 this, SLOT(loadPage( const QString &)));113 connect(m_tabWidget, SIGNAL(setCurrentTitle( const QString &)),114 this, SLOT(slotUpdateWindowTitle( const QString &)));115 connect(m_tabWidget, SIGNAL(showStatusBarMessage( const QString&)),116 statusBar(), SLOT(showMessage( const QString&)));117 connect(m_tabWidget, SIGNAL(linkHovered( const QString&)),118 statusBar(), SLOT(showMessage( const QString&)));112 connect(m_tabWidget, SIGNAL(loadPage()), 113 this, SLOT(loadPage())); 114 connect(m_tabWidget, SIGNAL(setCurrentTitle()), 115 this, SLOT(slotUpdateWindowTitle())); 116 connect(m_tabWidget, SIGNAL(showStatusBarMessage()), 117 statusBar(), SLOT(showMessage())); 118 connect(m_tabWidget, SIGNAL(linkHovered()), 119 statusBar(), SLOT(showMessage())); 119 120 connect(m_tabWidget, SIGNAL(loadProgress(int)), 120 121 this, SLOT(slotLoadProgress(int))); 121 122 connect(m_tabWidget, SIGNAL(tabsChanged()), 122 123 m_autoSaver, SLOT(changeOccurred())); 123 connect(m_tabWidget, SIGNAL(geometryChangeRequested( const QRect &)),124 this, SLOT(geometryChangeRequested( const QRect &)));125 connect(m_tabWidget, SIGNAL(printRequested(QWebFrame *)),126 this, SLOT(printRequested(QWebFrame *)));124 connect(m_tabWidget, SIGNAL(geometryChangeRequested()), 125 this, SLOT(geometryChangeRequested())); 126 connect(m_tabWidget, SIGNAL(printRequested(QWebFrame*)), 127 this, SLOT(printRequested(QWebFrame*))); 127 128 connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)), 128 129 menuBar(), SLOT(setVisible(bool))); … … 369 370 // History 370 371 HistoryMenu *historyMenu = new HistoryMenu(this); 371 connect(historyMenu, SIGNAL(openUrl( const QUrl&)),372 m_tabWidget, SLOT(loadUrlInCurrentTab( const QUrl&)));373 connect(historyMenu, SIGNAL(hovered( const QString&)), this,374 SLOT(slotUpdateStatusbar( const QString&)));372 connect(historyMenu, SIGNAL(openUrl()), 373 m_tabWidget, SLOT(loadUrlInCurrentTab())); 374 connect(historyMenu, SIGNAL(hovered()), this, 375 SLOT(slotUpdateStatusbar())); 375 376 historyMenu->setTitle(tr("Hi&story")); 376 377 menuBar()->addMenu(historyMenu); … … 404 405 // Bookmarks 405 406 BookmarksMenu *bookmarksMenu = new BookmarksMenu(this); 406 connect(bookmarksMenu, SIGNAL(openUrl( const QUrl&)),407 m_tabWidget, SLOT(loadUrlInCurrentTab( const QUrl&)));408 connect(bookmarksMenu, SIGNAL(hovered( const QString&)),409 this, SLOT(slotUpdateStatusbar( const QString&)));407 connect(bookmarksMenu, SIGNAL(openUrl()), 408 m_tabWidget, SLOT(loadUrlInCurrentTab())); 409 connect(bookmarksMenu, SIGNAL(hovered()), 410 this, SLOT(slotUpdateStatusbar())); 410 411 bookmarksMenu->setTitle(tr("&Bookmarks")); 411 412 menuBar()->addMenu(bookmarksMenu); … … 455 456 connect(m_historyBackMenu, SIGNAL(aboutToShow()), 456 457 this, SLOT(slotAboutToShowBackMenu())); 457 connect(m_historyBackMenu, SIGNAL(triggered(QAction *)),458 this, SLOT(slotOpenActionUrl(QAction *)));458 connect(m_historyBackMenu, SIGNAL(triggered(QAction*)), 459 this, SLOT(slotOpenActionUrl(QAction*))); 459 460 m_navigationBar->addAction(m_historyBack); 460 461 … … 463 464 connect(m_historyForwardMenu, SIGNAL(aboutToShow()), 464 465 this, SLOT(slotAboutToShowForwardMenu())); 465 connect(m_historyForwardMenu, SIGNAL(triggered(QAction *)),466 this, SLOT(slotOpenActionUrl(QAction *)));466 connect(m_historyForwardMenu, SIGNAL(triggered(QAction*)), 467 this, SLOT(slotOpenActionUrl(QAction*))); 467 468 m_historyForward->setMenu(m_historyForwardMenu); 468 469 m_navigationBar->addAction(m_historyForward); … … 478 479 m_toolbarSearch = new ToolbarSearch(m_navigationBar); 479 480 m_navigationBar->addWidget(m_toolbarSearch); 480 connect(m_toolbarSearch, SIGNAL(search( const QUrl&)), SLOT(loadUrl(const QUrl&)));481 connect(m_toolbarSearch, SIGNAL(search())); 481 482 482 483 m_chaseWidget = new ChaseWidget(this); … … 487 488 { 488 489 BookmarksDialog *dialog = new BookmarksDialog(this); 489 connect(dialog, SIGNAL(openUrl( const QUrl&)),490 m_tabWidget, SLOT(loadUrlInCurrentTab( const QUrl&)));490 connect(dialog, SIGNAL(openUrl()), 491 m_tabWidget, SLOT(loadUrlInCurrentTab())); 491 492 dialog->show(); 492 493 } … … 550 551 } 551 552 m_autoSaver->changeOccurred(); 552 }553 554 QUrl BrowserMainWindow::guessUrlFromString(const QString &string)555 {556 QString urlStr = string.trimmed();557 QRegExp test(QLatin1String("^[a-zA-Z]+\\:.*"));558 559 // Check if it looks like a qualified URL. Try parsing it and see.560 bool hasSchema = test.exactMatch(urlStr);561 if (hasSchema) {562 QUrl url = QUrl::fromEncoded(urlStr.toUtf8(), QUrl::TolerantMode);563 if (url.isValid())564 return url;565 }566 567 // Might be a file.568 if (QFile::exists(urlStr)) {569 QFileInfo info(urlStr);570 return QUrl::fromLocalFile(info.absoluteFilePath());571 }572 573 // Might be a shorturl - try to detect the schema.574 if (!hasSchema) {575 int dotIndex = urlStr.indexOf(QLatin1Char('.'));576 if (dotIndex != -1) {577 QString prefix = urlStr.left(dotIndex).toLower();578 QByteArray schema = (prefix == QLatin1String("ftp")) ? prefix.toLatin1() : "http";579 QUrl url =580 QUrl::fromEncoded(schema + "://" + urlStr.toUtf8(), QUrl::TolerantMode);581 if (url.isValid())582 return url;583 }584 }585 586 // Fall back to QUrl's own tolerant parser.587 QUrl url = QUrl::fromEncoded(string.toUtf8(), QUrl::TolerantMode);588 589 // finally for cases where the user just types in a hostname add http590 if (url.scheme().isEmpty())591 url = QUrl::fromEncoded("http://" + string.toUtf8(), QUrl::TolerantMode);592 return url;593 553 } 594 554 … … 677 637 return; 678 638 QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this); 679 connect(dialog, SIGNAL(paintRequested(QPrinter *)),680 currentTab(), SLOT(print(QPrinter *)));639 connect(dialog, SIGNAL(paintRequested(QPrinter*)), 640 currentTab(), SLOT(print(QPrinter*))); 681 641 dialog->exec(); 682 642 #endif … … 740 700 int ret = QMessageBox::warning(this, QString(), 741 701 tr("Are you sure you want to close the window?" 742 " There are %1 tab open").arg(m_tabWidget->count()),702 " There are %1 tab open").arg(m_tabWidget->count()), 743 703 QMessageBox::Yes | QMessageBox::No, 744 704 QMessageBox::No); … … 839 799 QSettings settings; 840 800 settings.beginGroup(QLatin1String("MainWindow")); 841 QString home = settings.value(QLatin1String("home"), QLatin1String("http://qt software.com/")).toString();801 QString home = settings.value(QLatin1String("home"), QLatin1String("http://qt.com/")).toString(); 842 802 loadPage(home); 843 803 } … … 873 833 void BrowserMainWindow::loadPage(const QString &page) 874 834 { 875 QUrl url = guessUrlFromString(page);835 QUrl url = (page); 876 836 loadUrl(url); 877 837 } -
trunk/demos/browser/browsermainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 69 69 70 70 public: 71 static QUrl guessUrlFromString(const QString &url);72 71 TabWidget *tabWidget() const; 73 72 WebView *currentTab() const; -
trunk/demos/browser/chasewidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/chasewidget.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/cookiejar.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 669 669 domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit)); 670 670 671 connect(domainLineEdit, SIGNAL(textChanged( const QString &)),672 this, SLOT(textChanged( const QString &)));671 connect(domainLineEdit, SIGNAL(textChanged()), 672 this, SLOT(textChanged())); 673 673 connect(blockButton, SIGNAL(clicked()), this, SLOT(block())); 674 674 connect(allowButton, SIGNAL(clicked()), this, SLOT(allow())); -
trunk/demos/browser/cookiejar.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/data/defaultbookmarks.xbel
r2 r561 4 4 <folder folded="yes"> 5 5 <title>Bookmarks Bar</title> 6 <bookmark href="http://qt software.com/">7 <title>Qt Software</title>6 <bookmark href="http://qt.com/"> 7 <title>Qt e</title> 8 8 </bookmark> 9 9 <bookmark href="http://webkit.org/"> 10 10 <title>WebKit.org</title> 11 11 </bookmark> 12 <bookmark href="http:// doc.trolltech.com/">12 <bookmark href="http:///"> 13 13 <title>Qt Documentation</title> 14 14 </bookmark> 15 <bookmark href="http:// doc.trolltech.com/qq/">15 <bookmark href="http:///qq/"> 16 16 <title>Qt Quarterly</title> 17 17 </bookmark> 18 <bookmark href="http://labs. trolltech.com/">18 <bookmark href="http://labs..com/"> 19 19 <title>Qt Labs</title> 20 20 </bookmark> … … 31 31 <title>xkcd</title> 32 32 </bookmark> 33 34 35 33 36 </folder> 34 37 <folder folded="yes"> -
trunk/demos/browser/downloadmanager.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 95 95 connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), 96 96 this, SLOT(error(QNetworkReply::NetworkError))); 97 connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)),98 this, SLOT(downloadProgress(qint64, qint64)));97 connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)), 98 this, SLOT(downloadProgress(qint64,qint64))); 99 99 connect(m_reply, SIGNAL(metaDataChanged()), 100 100 this, SLOT(metaDataChanged())); -
trunk/demos/browser/downloadmanager.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittableview.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittableview.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittreeview.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittreeview.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/history.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 78 78 connect(&m_expiredTimer, SIGNAL(timeout()), 79 79 this, SLOT(checkForExpired())); 80 connect(this, SIGNAL(entryAdded( const HistoryItem &)),80 connect(this, SIGNAL(entryAdded()), 81 81 m_saveTimer, SLOT(changeOccurred())); 82 connect(this, SIGNAL(entryRemoved( const HistoryItem &)),82 connect(this, SIGNAL(entryRemoved()), 83 83 m_saveTimer, SLOT(changeOccurred())); 84 84 load(); … … 370 370 connect(m_history, SIGNAL(historyReset()), 371 371 this, SLOT(historyReset())); 372 connect(m_history, SIGNAL(entryRemoved( const HistoryItem &)),372 connect(m_history, SIGNAL(entryRemoved()), 373 373 this, SLOT(historyReset())); 374 374 375 connect(m_history, SIGNAL(entryAdded( const HistoryItem &)),375 connect(m_history, SIGNAL(entryAdded()), 376 376 this, SLOT(entryAdded())); 377 377 connect(m_history, SIGNAL(entryUpdated(int)), … … 596 596 , m_history(0) 597 597 { 598 connect(this, SIGNAL(activated( const QModelIndex &)),599 this, SLOT(activated( const QModelIndex &)));598 connect(this, SIGNAL(activated()), 599 this, SLOT(activated())); 600 600 setHoverRole(HistoryModel::UrlStringRole); 601 601 } … … 640 640 { 641 641 HistoryDialog *dialog = new HistoryDialog(this); 642 connect(dialog, SIGNAL(openUrl( const QUrl&)),643 this, SIGNAL(openUrl( const QUrl&)));642 connect(dialog, SIGNAL(openUrl()), 643 this, SIGNAL(openUrl())); 644 644 dialog->show(); 645 645 } … … 688 688 tree->header()->resizeSection(0, header); 689 689 tree->header()->setStretchLastSection(true); 690 connect(tree, SIGNAL(activated( const QModelIndex&)),690 connect(tree, SIGNAL(activated()), 691 691 this, SLOT(open())); 692 692 tree->setContextMenuPolicy(Qt::CustomContextMenu); 693 connect(tree, SIGNAL(customContextMenuRequested( const QPoint &)),694 this, SLOT(customContextMenuRequested( const QPoint &)));693 connect(tree, SIGNAL(customContextMenuRequested()), 694 this, SLOT(customContextMenuRequested())); 695 695 } 696 696 … … 752 752 if (sourceModel()) { 753 753 disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 754 disconnect(sourceModel(), SIGNAL(dataChanged( const QModelIndex &, const QModelIndex &)),755 this, SLOT(dataChanged( const QModelIndex &, const QModelIndex &)));756 disconnect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),757 this, SLOT(sourceRowsInserted( const QModelIndex &, int,int)));758 disconnect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),759 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));754 disconnect(sourceModel(), SIGNAL(dataChanged()), 755 this, SLOT(dataChanged())); 756 disconnect(sourceModel(), SIGNAL(rowsInserted(int)), 757 this, SLOT(sourceRowsInserted(int))); 758 disconnect(sourceModel(), SIGNAL(rowsRemoved(int)), 759 this, SLOT(sourceRowsRemoved(int))); 760 760 } 761 761 … … 765 765 m_loaded = false; 766 766 connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 767 connect(sourceModel(), SIGNAL(dataChanged( const QModelIndex &, const QModelIndex &)),768 this, SLOT(sourceDataChanged( const QModelIndex &, const QModelIndex &)));769 connect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),770 this, SLOT(sourceRowsInserted( const QModelIndex &, int,int)));771 connect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),772 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));767 connect(sourceModel(), SIGNAL(dataChanged()), 768 this, SLOT(sourceDataChanged())); 769 connect(sourceModel(), SIGNAL(rowsInserted(int)), 770 this, SLOT(sourceRowsInserted(int))); 771 connect(sourceModel(), SIGNAL(rowsRemoved(int)), 772 this, SLOT(sourceRowsRemoved(int))); 773 773 } 774 774 } … … 907 907 return false; 908 908 int lastRow = row + count - 1; 909 disconnect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),910 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));909 disconnect(sourceModel(), SIGNAL(rowsRemoved(int)), 910 this, SLOT(sourceRowsRemoved(int))); 911 911 beginRemoveRows(parent, row, lastRow); 912 912 int oldCount = rowCount(); … … 915 915 sourceModel()->removeRows(start, end - start + 1); 916 916 endRemoveRows(); 917 connect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),918 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));917 connect(sourceModel(), SIGNAL(rowsRemoved(int)), 918 this, SLOT(sourceRowsRemoved(int))); 919 919 m_loaded = false; 920 920 if (oldCount - count != rowCount()) … … 989 989 if (sourceModel()) { 990 990 disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 991 disconnect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),991 disconnect(sourceModel(), SIGNAL(rowsInserted(int)), 992 992 this, SLOT(sourceReset())); 993 disconnect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),993 disconnect(sourceModel(), SIGNAL(rowsRemoved(int)), 994 994 this, SLOT(sourceReset())); 995 995 } … … 999 999 if (newSourceModel) { 1000 1000 connect(newSourceModel, SIGNAL(modelReset()), this, SLOT(sourceReset())); 1001 connect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),1001 connect(sourceModel(), SIGNAL(rowsInserted(int)), 1002 1002 this, SLOT(sourceReset())); 1003 connect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),1003 connect(sourceModel(), SIGNAL(rowsRemoved(int)), 1004 1004 this, SLOT(sourceReset())); 1005 1005 } … … 1178 1178 disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 1179 1179 disconnect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); 1180 disconnect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),1181 this, SLOT(sourceRowsInserted( const QModelIndex &, int,int)));1182 disconnect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),1183 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));1180 disconnect(sourceModel(), SIGNAL(rowsInserted(int)), 1181 this, SLOT(sourceRowsInserted(int))); 1182 disconnect(sourceModel(), SIGNAL(rowsRemoved(int)), 1183 this, SLOT(sourceRowsRemoved(int))); 1184 1184 } 1185 1185 … … 1189 1189 connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 1190 1190 connect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); 1191 connect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),1192 this, SLOT(sourceRowsInserted( const QModelIndex &, int,int)));1193 connect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),1194 this, SLOT(sourceRowsRemoved( const QModelIndex &, int,int)));1191 connect(sourceModel(), SIGNAL(rowsInserted(int)), 1192 this, SLOT(sourceRowsInserted(int))); 1193 connect(sourceModel(), SIGNAL(rowsRemoved(int)), 1194 this, SLOT(sourceRowsRemoved(int))); 1195 1195 } 1196 1196 -
trunk/demos/browser/history.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/htmls/notfound.html
r2 r561 50 50 <h2>When connecting to: %3.</h2> 51 51 <ul> 52 <li>Check the address for errors such as <b>ww</b>. trolltech.com53 instead of <b>www</b>. trolltech.com</li>52 <li>Check the address for errors such as <b>ww</b>..com 53 instead of <b>www</b>..com</li> 54 54 <li>If the address is correct, try checking the network 55 55 connection.</li> -
trunk/demos/browser/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/modelmenu.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/modelmenu.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/networkaccessmanager.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 #include <QtNetwork/QNetworkDiskCache> 59 59 #include <QtNetwork/QNetworkProxy> 60 60 61 #include <QtNetwork/QNetworkReply> 61 62 #include <QtNetwork/QSslError> 62 63 63 64 NetworkAccessManager::NetworkAccessManager(QObject *parent) 64 : QNetworkAccessManager(parent) 65 { 66 connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), 65 : QNetworkAccessManager(parent), 66 requestFinishedCount(0), requestFinishedFromCacheCount(0), requestFinishedPipelinedCount(0), 67 requestFinishedSecureCount(0) 68 { 69 connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), 67 70 SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); 68 connect(this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), 69 SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*))); 71 connect(this, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), 72 SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); 73 connect(this, SIGNAL(finished(QNetworkReply*)), 74 SLOT(requestFinished(QNetworkReply*))); 70 75 #ifndef QT_NO_OPENSSL 71 connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),72 SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));76 connect(this, SIGNAL(sslErrors(QNetworkReply*,)), 77 SLOT(sslErrors(QNetworkReply*,))); 73 78 #endif 74 79 loadSettings(); … … 78 83 diskCache->setCacheDirectory(location); 79 84 setCache(diskCache); 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 80 117 } 81 118 -
trunk/demos/browser/networkaccessmanager.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 44 44 45 45 #include <QtNetwork/QNetworkAccessManager> 46 46 47 47 48 class NetworkAccessManager : public QNetworkAccessManager … … 52 53 NetworkAccessManager(QObject *parent = 0); 53 54 55 56 54 57 private: 55 58 QList<QString> sslTrustedHostList; 59 60 61 62 56 63 57 64 public slots: 58 65 void loadSettings(); 66 59 67 60 68 private slots: -
trunk/demos/browser/searchlineedit.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 51 51 : QAbstractButton(parent) 52 52 { 53 53 54 setCursor(Qt::ArrowCursor); 55 54 56 setToolTip(tr("Clear")); 55 57 setVisible(false); … … 104 106 { 105 107 setObjectName(QLatin1String("SearchButton")); 108 106 109 setCursor(Qt::ArrowCursor); 110 107 111 setFocusPolicy(Qt::NoFocus); 108 112 } … … 166 170 m_searchButton(new SearchButton(this)) 167 171 { 168 connect(lineEdit(), SIGNAL(textChanged( const QString &)),169 this, SIGNAL(textChanged( const QString &)));172 connect(lineEdit(), SIGNAL(textChanged()), 173 this, SIGNAL(textChanged())); 170 174 setLeftWidget(m_searchButton); 171 175 m_inactiveText = tr("Search"); -
trunk/demos/browser/searchlineedit.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/settings.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 90 90 QSettings settings; 91 91 settings.beginGroup(QLatin1String("MainWindow")); 92 QString defaultHome = QLatin1String("http://qt software.com");92 QString defaultHome = QLatin1String("http://qt.com"); 93 93 homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString()); 94 94 settings.endGroup(); -
trunk/demos/browser/settings.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/squeezelabel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/squeezelabel.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/tabwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 65 65 setContextMenuPolicy(Qt::CustomContextMenu); 66 66 setAcceptDrops(true); 67 connect(this, SIGNAL(customContextMenuRequested( const QPoint &)),68 this, SLOT(contextMenuRequested( const QPoint &)));67 connect(this, SIGNAL(customContextMenuRequested()), 68 this, SLOT(contextMenuRequested())); 69 69 70 70 QString alt = QLatin1String("Alt+%1"); … … 222 222 connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int))); 223 223 connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(reloadAllTabs())); 224 connect(m_tabBar, SIGNAL(tabMoved(int, int)), this, SLOT(moveTab(int,int)));224 connect(m_tabBar, SIGNAL(tabMoved(int,int))); 225 225 setTabBar(m_tabBar); 226 226 setDocumentMode(true); … … 258 258 connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), 259 259 this, SLOT(aboutToShowRecentTabsMenu())); 260 connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)),261 this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));260 connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction*)), 261 this, SLOT(aboutToShowRecentTriggeredAction(QAction*))); 262 262 m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this); 263 263 m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu); … … 305 305 WebView *oldWebView = this->webView(m_lineEdits->currentIndex()); 306 306 if (oldWebView) { 307 disconnect(oldWebView, SIGNAL(statusBarMessage( const QString&)),308 this, SIGNAL(showStatusBarMessage( const QString&)));309 disconnect(oldWebView->page(), SIGNAL(linkHovered( const QString&, const QString&, const QString&)),310 this, SIGNAL(linkHovered( const QString&)));307 disconnect(oldWebView, SIGNAL(statusBarMessage()), 308 this, SIGNAL(showStatusBarMessage())); 309 disconnect(oldWebView->page(), SIGNAL(linkHovered()), 310 this, SIGNAL(linkHovered())); 311 311 disconnect(oldWebView, SIGNAL(loadProgress(int)), 312 312 this, SIGNAL(loadProgress(int))); 313 313 } 314 314 315 connect(webView, SIGNAL(statusBarMessage( const QString&)),316 this, SIGNAL(showStatusBarMessage( const QString&)));317 connect(webView->page(), SIGNAL(linkHovered( const QString&, const QString&, const QString&)),318 this, SIGNAL(linkHovered( const QString&)));315 connect(webView, SIGNAL(statusBarMessage()), 316 this, SIGNAL(showStatusBarMessage())); 317 connect(webView->page(), SIGNAL(linkHovered()), 318 this, SIGNAL(linkHovered())); 319 319 connect(webView, SIGNAL(loadProgress(int)), 320 320 this, SIGNAL(loadProgress(int))); … … 451 451 connect(webView, SIGNAL(iconChanged()), 452 452 this, SLOT(webViewIconChanged())); 453 connect(webView, SIGNAL(titleChanged( const QString &)),454 this, SLOT(webViewTitleChanged( const QString &)));455 connect(webView, SIGNAL(urlChanged( const QUrl &)),456 this, SLOT(webViewUrlChanged( const QUrl &)));453 connect(webView, SIGNAL(titleChanged()), 454 this, SLOT(webViewTitleChanged())); 455 connect(webView, SIGNAL(urlChanged()), 456 this, SLOT(webViewUrlChanged())); 457 457 connect(webView->page(), SIGNAL(windowCloseRequested()), 458 458 this, SLOT(windowCloseRequested())); 459 connect(webView->page(), SIGNAL(geometryChangeRequested( const QRect &)),460 this, SIGNAL(geometryChangeRequested( const QRect &)));461 connect(webView->page(), SIGNAL(printRequested(QWebFrame *)),462 this, SIGNAL(printRequested(QWebFrame *)));459 connect(webView->page(), SIGNAL(geometryChangeRequested()), 460 this, SIGNAL(geometryChangeRequested())); 461 connect(webView->page(), SIGNAL(printRequested(QWebFrame*)), 462 this, SIGNAL(printRequested(QWebFrame*))); 463 463 connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)), 464 464 this, SIGNAL(menuBarVisibilityChangeRequested(bool))); … … 561 561 hasFocus = tab->hasFocus(); 562 562 563 m_recentlyClosedTabsAction->setEnabled(true); 564 m_recentlyClosedTabs.prepend(tab->url()); 565 if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize) 566 m_recentlyClosedTabs.removeLast(); 563 QWebSettings *globalSettings = QWebSettings::globalSettings(); 564 if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) { 565 m_recentlyClosedTabsAction->setEnabled(true); 566 m_recentlyClosedTabs.prepend(tab->url()); 567 if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize) 568 m_recentlyClosedTabs.removeLast(); 569 } 567 570 } 568 571 QWidget *lineEdit = m_lineEdits->widget(index); … … 762 765 return; 763 766 connect(m_root, SIGNAL(triggered()), this, SLOT(rootTriggered())); 764 connect(root, SIGNAL(destroyed(QObject *)), this, SLOT(rootDestroyed()));767 connect(root, SIGNAL(destroyed(QObject*)), this, SLOT(rootDestroyed())); 765 768 root->setEnabled(false); 766 769 } … … 811 814 { 812 815 if (m_currentParent) 813 disconnect(m_currentParent, SIGNAL(destroyed(QObject *)),816 disconnect(m_currentParent, SIGNAL(destroyed(QObject*)), 814 817 this, SLOT(currentDestroyed())); 815 818 … … 825 828 m_root->setChecked(source->isChecked()); 826 829 m_root->setEnabled(source->isEnabled()); 827 connect(m_currentParent, SIGNAL(destroyed(QObject *)),830 connect(m_currentParent, SIGNAL(destroyed(QObject*)), 828 831 this, SLOT(currentDestroyed())); 829 832 } -
trunk/demos/browser/tabwidget.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/toolbarsearch.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/toolbarsearch.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/urllineedit.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 88 88 connect(m_clearButton, SIGNAL(clicked()), 89 89 m_lineEdit, SLOT(clear())); 90 connect(m_lineEdit, SIGNAL(textChanged( const QString&)),91 m_clearButton, SLOT(textChanged( const QString&)));90 connect(m_lineEdit, SIGNAL(textChanged()), 91 m_clearButton, SLOT(textChanged())); 92 92 } 93 93 … … 271 271 m_webView = webView; 272 272 m_iconLabel->m_webView = webView; 273 connect(webView, SIGNAL(urlChanged( const QUrl &)),274 this, SLOT(webViewUrlChanged( const QUrl &)));273 connect(webView, SIGNAL(urlChanged()), 274 this, SLOT(webViewUrlChanged())); 275 275 connect(webView, SIGNAL(loadFinished(bool)), 276 276 this, SLOT(webViewIconChanged())); -
trunk/demos/browser/urllineedit.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/webview.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 #include <QtWebKit/QWebHitTestResult> 56 56 57 57 58 #include <QtUiTools/QUiLoader> 59 58 60 59 61 #include <QtCore/QDebug> … … 67 69 { 68 70 setNetworkAccessManager(BrowserApplication::networkAccessManager()); 69 connect(this, SIGNAL(unsupportedContent(QNetworkReply *)),70 this, SLOT(handleUnsupportedContent(QNetworkReply *)));71 connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), 72 this, SLOT(handleUnsupportedContent(QNetworkReply*))); 71 73 } 72 74 … … 150 152 bool isOpened = file.open(QIODevice::ReadOnly); 151 153 Q_ASSERT(isOpened); 154 155 152 156 QString title = tr("Error loading page: %1").arg(reply->url().toString()); 153 157 QString html = QString(QLatin1String(file.readAll())) … … 189 193 { 190 194 setPage(m_page); 191 connect(page(), SIGNAL(statusBarMessage( const QString&)),192 SLOT(setStatusBarText( const QString&)));195 connect(page(), SIGNAL(statusBarMessage()), 196 SLOT(setStatusBarText())); 193 197 connect(this, SIGNAL(loadProgress(int)), 194 198 this, SLOT(setProgress(int))); 195 199 connect(this, SIGNAL(loadFinished(bool)), 196 200 this, SLOT(loadFinished())); 197 connect(page(), SIGNAL(loadingUrl( const QUrl&)),198 this, SIGNAL(urlChanged( const QUrl &)));199 connect(page(), SIGNAL(downloadRequested( const QNetworkRequest &)),200 this, SLOT(downloadRequested( const QNetworkRequest &)));201 connect(page(), SIGNAL(loadingUrl()), 202 this, SIGNAL(urlChanged())); 203 connect(page(), SIGNAL(downloadRequested()), 204 this, SLOT(downloadRequested())); 201 205 page()->setForwardUnsupportedContent(true); 202 206 -
trunk/demos/browser/webview.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/xbel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 134 134 BookmarkNode *root = new BookmarkNode(BookmarkNode::Root); 135 135 setDevice(device); 136 while (!atEnd()) { 137 readNext(); 138 if (isStartElement()) { 139 QString version = attributes().value(QLatin1String("version")).toString(); 140 if (name() == QLatin1String("xbel") 141 && (version.isEmpty() || version == QLatin1String("1.0"))) { 142 readXBEL(root); 143 } else { 144 raiseError(QObject::tr("The file is not an XBEL version 1.0 file.")); 145 } 136 if (readNextStartElement()) { 137 QString version = attributes().value(QLatin1String("version")).toString(); 138 if (name() == QLatin1String("xbel") 139 && (version.isEmpty() || version == QLatin1String("1.0"))) { 140 readXBEL(root); 141 } else { 142 raiseError(QObject::tr("The file is not an XBEL version 1.0 file.")); 146 143 } 147 144 } … … 153 150 Q_ASSERT(isStartElement() && name() == QLatin1String("xbel")); 154 151 155 while (!atEnd()) { 156 readNext(); 157 if (isEndElement()) 158 break; 159 160 if (isStartElement()) { 161 if (name() == QLatin1String("folder")) 162 readFolder(parent); 163 else if (name() == QLatin1String("bookmark")) 164 readBookmarkNode(parent); 165 else if (name() == QLatin1String("separator")) 166 readSeparator(parent); 167 else 168 skipUnknownElement(); 169 } 152 while (readNextStartElement()) { 153 if (name() == QLatin1String("folder")) 154 readFolder(parent); 155 else if (name() == QLatin1String("bookmark")) 156 readBookmarkNode(parent); 157 else if (name() == QLatin1String("separator")) 158 readSeparator(parent); 159 else 160 skipCurrentElement(); 170 161 } 171 162 } … … 178 169 folder->expanded = (attributes().value(QLatin1String("folded")) == QLatin1String("no")); 179 170 180 while (!atEnd()) { 181 readNext(); 182 183 if (isEndElement()) 184 break; 185 186 if (isStartElement()) { 187 if (name() == QLatin1String("title")) 188 readTitle(folder); 189 else if (name() == QLatin1String("desc")) 190 readDescription(folder); 191 else if (name() == QLatin1String("folder")) 192 readFolder(folder); 193 else if (name() == QLatin1String("bookmark")) 194 readBookmarkNode(folder); 195 else if (name() == QLatin1String("separator")) 196 readSeparator(folder); 197 else 198 skipUnknownElement(); 199 } 171 while (readNextStartElement()) { 172 if (name() == QLatin1String("title")) 173 readTitle(folder); 174 else if (name() == QLatin1String("desc")) 175 readDescription(folder); 176 else if (name() == QLatin1String("folder")) 177 readFolder(folder); 178 else if (name() == QLatin1String("bookmark")) 179 readBookmarkNode(folder); 180 else if (name() == QLatin1String("separator")) 181 readSeparator(folder); 182 else 183 skipCurrentElement(); 200 184 } 201 185 } … … 225 209 BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark, parent); 226 210 bookmark->url = attributes().value(QLatin1String("href")).toString(); 227 while (!atEnd()) { 228 readNext(); 229 if (isEndElement()) 230 break; 231 232 if (isStartElement()) { 233 if (name() == QLatin1String("title")) 234 readTitle(bookmark); 235 else if (name() == QLatin1String("desc")) 236 readDescription(bookmark); 237 else 238 skipUnknownElement(); 239 } 211 while (readNextStartElement()) { 212 if (name() == QLatin1String("title")) 213 readTitle(bookmark); 214 else if (name() == QLatin1String("desc")) 215 readDescription(bookmark); 216 else 217 skipCurrentElement(); 240 218 } 241 219 if (bookmark->title.isEmpty()) 242 220 bookmark->title = QObject::tr("Unknown title"); 243 }244 245 void XbelReader::skipUnknownElement()246 {247 Q_ASSERT(isStartElement());248 249 while (!atEnd()) {250 readNext();251 252 if (isEndElement())253 break;254 255 if (isStartElement())256 skipUnknownElement();257 }258 221 } 259 222 -
trunk/demos/browser/xbel.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 88 88 89 89 private: 90 void skipUnknownElement();91 90 void readXBEL(BookmarkNode *parent); 92 91 void readTitle(BookmarkNode *parent);
Note:
See TracChangeset
for help on using the changeset viewer.
