Commit 7b24a593 authored by kh's avatar kh

Whitespace cleanup, normalize connect.

Reviewed-by: dt
parent b50eaa65
......@@ -113,8 +113,8 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent)
if (tabBar) {
tabBar->installEventFilter(this);
tabBar->setContextMenuPolicy(Qt::CustomContextMenu);
connect(tabBar, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(showTabBarContextMenu(const QPoint&)));
connect(tabBar, SIGNAL(customContextMenuRequested(QPoint)), this,
SLOT(showTabBarContextMenu(QPoint)));
}
staticCentralWidget = this;
......@@ -314,7 +314,8 @@ void CentralWidget::printPreview()
#ifndef QT_NO_PRINTER
initPrinter();
QPrintPreviewDialog preview(printer, this);
connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *)));
connect(&preview, SIGNAL(paintRequested(QPrinter*)),
SLOT(printPreview(QPrinter*)));
preview.exec();
#endif
}
......@@ -422,13 +423,18 @@ void CentralWidget::connectSignals()
{
const HelpViewer* viewer = currentHelpViewer();
if (viewer) {
connect(viewer, SIGNAL(copyAvailable(bool)), this, SIGNAL(copyAvailable(bool)));
connect(viewer, SIGNAL(forwardAvailable(bool)), this, SIGNAL(forwardAvailable(bool)));
connect(viewer, SIGNAL(backwardAvailable(bool)), this, SIGNAL(backwardAvailable(bool)));
connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SIGNAL(sourceChanged(const QUrl&)));
connect(viewer, SIGNAL(highlighted(const QString&)), this, SIGNAL(highlighted(const QString&)));
connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SLOT(setTabTitle(const QUrl&)));
connect(viewer, SIGNAL(copyAvailable(bool)), this,
SIGNAL(copyAvailable(bool)));
connect(viewer, SIGNAL(forwardAvailable(bool)), this,
SIGNAL(forwardAvailable(bool)));
connect(viewer, SIGNAL(backwardAvailable(bool)), this,
SIGNAL(backwardAvailable(bool)));
connect(viewer, SIGNAL(sourceChanged(QUrl)), this,
SIGNAL(sourceChanged(QUrl)));
connect(viewer, SIGNAL(highlighted(QString)), this,
SIGNAL(highlighted(QString)));
connect(viewer, SIGNAL(sourceChanged(QUrl)), this,
SLOT(setTabTitle(QUrl)));
}
}
......
......@@ -35,7 +35,7 @@
#include <QtHelp/QHelpEngine>
using namespace Help::Internal;
FilterSettingsPage::FilterSettingsPage(QHelpEngine *helpEngine) :
m_helpEngine(helpEngine)
{
......@@ -67,18 +67,17 @@ QWidget *FilterSettingsPage::createPage(QWidget *parent)
m_ui.setupUi(m_currentPage);
m_ui.attributeWidget->header()->hide();
m_ui.attributeWidget->setRootIsDecorated(false);
connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)),
this, SLOT(updateFilterMap()));
connect(m_ui.filterWidget,
SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this, SLOT(updateAttributes(QListWidgetItem*)));
connect(m_ui.filterAddButton, SIGNAL(clicked()),
this, SLOT(addFilter()));
connect(m_ui.filterRemoveButton, SIGNAL(clicked()),
this, SLOT(removeFilter()));
SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this,
SLOT(updateAttributes(QListWidgetItem*)));
connect(m_ui.filterAddButton, SIGNAL(clicked()), this, SLOT(addFilter()));
connect(m_ui.filterRemoveButton, SIGNAL(clicked()), this,
SLOT(removeFilter()));
updateFilterPage();
return m_currentPage;
}
......@@ -91,7 +90,7 @@ void FilterSettingsPage::updateFilterPage()
m_ui.attributeWidget->clear();
QHelpEngineCore help(m_helpEngine->collectionFile(), 0);
help.setupData();
help.setupData();
m_filterMapBackup.clear();
const QStringList filters = help.customFilters();
foreach (const QString filter, filters) {
......@@ -105,7 +104,7 @@ void FilterSettingsPage::updateFilterPage()
foreach (const QString a, help.filterAttributes())
new QTreeWidgetItem(m_ui.attributeWidget, QStringList() << a);
if (m_filterMap.keys().count())
m_ui.filterWidget->setCurrentRow(0);
}
......@@ -132,7 +131,7 @@ void FilterSettingsPage::updateFilterMap()
QString filter = m_ui.filterWidget->currentItem()->text();
if (!m_filterMap.contains(filter))
return;
QStringList newAtts;
QTreeWidgetItem *itm = 0;
for (int i=0; i<m_ui.attributeWidget->topLevelItemCount(); ++i) {
......@@ -140,7 +139,7 @@ void FilterSettingsPage::updateFilterMap()
if (itm->checkState(0) == Qt::Checked)
newAtts.append(itm->text(0));
}
m_filterMap[filter] = newAtts;
m_filterMap[filter] = newAtts;
}
void FilterSettingsPage::addFilter()
......@@ -157,7 +156,7 @@ void FilterSettingsPage::addFilter()
QList<QListWidgetItem*> lst = m_ui.filterWidget
->findItems(filterName, Qt::MatchCaseSensitive);
m_ui.filterWidget->setCurrentItem(lst.first());
m_ui.filterWidget->setCurrentItem(lst.first());
}
void FilterSettingsPage::removeFilter()
......@@ -175,7 +174,7 @@ void FilterSettingsPage::removeFilter()
}
void FilterSettingsPage::apply()
{
{
// This is handled via HelpPlugin::checkForHelpChanges, which is connected
// to DocSettingsPage::apply.
}
......
......@@ -63,7 +63,7 @@ private slots:
void updateFilterMap();
void updateFilterPage();
void addFilter();
void removeFilter();
void removeFilter();
private:
QHelpEngine *m_helpEngine;
......
......@@ -87,7 +87,7 @@ HelpViewerFindSupport::HelpViewerFindSupport(HelpViewer *viewer)
QString HelpViewerFindSupport::currentFindString() const
{
QTC_ASSERT(m_viewer, return QString());
#if !defined(QT_NO_WEBKIT)
#if !defined(QT_NO_WEBKIT)
return m_viewer->selectedText();
#else
return QString();
......
This diff is collapsed.
......@@ -235,7 +235,7 @@ HelpViewer::HelpViewer(QHelpEngine *engine, Help::Internal::CentralWidget *paren
, helpEngine(engine)
, parentWidget(parent)
, multiTabsAllowed(true)
{
{
setPage(new HelpPage(parent, helpEngine, this));
settings()->setAttribute(QWebSettings::PluginsEnabled, false);
settings()->setAttribute(QWebSettings::JavaEnabled, false);
......
......@@ -142,7 +142,7 @@ protected:
void wheelEvent(QWheelEvent *e);
private:
QVariant loadResource(int type, const QUrl &name);
QVariant loadResource(int type, const QUrl &name);
void openLinkInNewTab(const QString &link);
bool hasAnchorAt(const QPoint& pos);
void contextMenuEvent(QContextMenuEvent *e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment