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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/browser/tabwidget.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 demonstration applications 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**
     
    6565    setContextMenuPolicy(Qt::CustomContextMenu);
    6666    setAcceptDrops(true);
    67     connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
    68             this, SLOT(contextMenuRequested(const QPoint &)));
     67    connect(this, SIGNAL(customContextMenuRequested(QPoint)),
     68            this, SLOT(contextMenuRequested(QPoint)));
    6969
    7070    QString alt = QLatin1String("Alt+%1");
     
    222222    connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int)));
    223223    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)), this, SLOT(moveTab(int,int)));
    225225    setTabBar(m_tabBar);
    226226    setDocumentMode(true);
     
    258258    connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()),
    259259            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*)));
    262262    m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this);
    263263    m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
     
    305305    WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
    306306    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(QString)),
     308                this, SIGNAL(showStatusBarMessage(QString)));
     309        disconnect(oldWebView->page(), SIGNAL(linkHovered(QString,QString,QString)),
     310                this, SIGNAL(linkHovered(QString)));
    311311        disconnect(oldWebView, SIGNAL(loadProgress(int)),
    312312                this, SIGNAL(loadProgress(int)));
    313313    }
    314314
    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(QString)),
     316            this, SIGNAL(showStatusBarMessage(QString)));
     317    connect(webView->page(), SIGNAL(linkHovered(QString,QString,QString)),
     318            this, SIGNAL(linkHovered(QString)));
    319319    connect(webView, SIGNAL(loadProgress(int)),
    320320            this, SIGNAL(loadProgress(int)));
     
    451451    connect(webView, SIGNAL(iconChanged()),
    452452            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(QString)),
     454            this, SLOT(webViewTitleChanged(QString)));
     455    connect(webView, SIGNAL(urlChanged(QUrl)),
     456            this, SLOT(webViewUrlChanged(QUrl)));
    457457    connect(webView->page(), SIGNAL(windowCloseRequested()),
    458458            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(QRect)),
     460            this, SIGNAL(geometryChangeRequested(QRect)));
     461    connect(webView->page(), SIGNAL(printRequested(QWebFrame*)),
     462            this, SIGNAL(printRequested(QWebFrame*)));
    463463    connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
    464464            this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
     
    561561        hasFocus = tab->hasFocus();
    562562
    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        }
    567570    }
    568571    QWidget *lineEdit = m_lineEdits->widget(index);
     
    762765        return;
    763766    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()));
    765768    root->setEnabled(false);
    766769}
     
    811814{
    812815    if (m_currentParent)
    813         disconnect(m_currentParent, SIGNAL(destroyed(QObject *)),
     816        disconnect(m_currentParent, SIGNAL(destroyed(QObject*)),
    814817                   this, SLOT(currentDestroyed()));
    815818
     
    825828    m_root->setChecked(source->isChecked());
    826829    m_root->setEnabled(source->isEnabled());
    827     connect(m_currentParent, SIGNAL(destroyed(QObject *)),
     830    connect(m_currentParent, SIGNAL(destroyed(QObject*)),
    828831            this, SLOT(currentDestroyed()));
    829832}
Note: See TracChangeset for help on using the changeset viewer.