forked from qt-creator/qt-creator
Remove some unused code from central widget.
Change-Id: I07ee65ac438c20bb46803cdcc081e53b44834f4e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -99,13 +99,6 @@ CentralWidget *CentralWidget::instance()
|
||||
return gStaticCentralWidget;
|
||||
}
|
||||
|
||||
bool CentralWidget::hasSelection() const
|
||||
{
|
||||
if (HelpViewer* viewer = currentHelpViewer())
|
||||
return !viewer->selectedText().isEmpty();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CentralWidget::isForwardAvailable() const
|
||||
{
|
||||
const HelpViewer* viewer = currentHelpViewer();
|
||||
@@ -148,10 +141,7 @@ void CentralWidget::addPage(HelpViewer *page, bool fromSearch)
|
||||
|
||||
void CentralWidget::removePage(int index)
|
||||
{
|
||||
const bool currentChanged = (index == currentIndex());
|
||||
m_stackedWidget->removeWidget(m_stackedWidget->widget(index));
|
||||
if (currentChanged)
|
||||
emit currentViewerChanged();
|
||||
}
|
||||
|
||||
int CentralWidget::currentIndex() const
|
||||
@@ -162,7 +152,6 @@ int CentralWidget::currentIndex() const
|
||||
void CentralWidget::setCurrentPage(HelpViewer *page)
|
||||
{
|
||||
m_stackedWidget->setCurrentWidget(page);
|
||||
emit currentViewerChanged();
|
||||
}
|
||||
|
||||
bool CentralWidget::find(const QString &txt, Find::FindFlags flags,
|
||||
@@ -212,24 +201,12 @@ void CentralWidget::forward()
|
||||
viewer->forward();
|
||||
}
|
||||
|
||||
void CentralWidget::nextPage()
|
||||
{
|
||||
m_stackedWidget->setCurrentIndex((m_stackedWidget->currentIndex() + 1)
|
||||
% m_stackedWidget->count());
|
||||
}
|
||||
|
||||
void CentralWidget::backward()
|
||||
{
|
||||
if (HelpViewer* viewer = currentHelpViewer())
|
||||
viewer->backward();
|
||||
}
|
||||
|
||||
void CentralWidget::previousPage()
|
||||
{
|
||||
m_stackedWidget->setCurrentIndex((m_stackedWidget->currentIndex() - 1)
|
||||
% m_stackedWidget->count());
|
||||
}
|
||||
|
||||
void CentralWidget::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
@@ -59,7 +59,6 @@ public:
|
||||
|
||||
static CentralWidget *instance();
|
||||
|
||||
bool hasSelection() const;
|
||||
bool isForwardAvailable() const;
|
||||
bool isBackwardAvailable() const;
|
||||
|
||||
@@ -84,10 +83,7 @@ public slots:
|
||||
void resetZoom();
|
||||
|
||||
void forward();
|
||||
void nextPage();
|
||||
|
||||
void backward();
|
||||
void previousPage();
|
||||
|
||||
void print();
|
||||
void pageSetup();
|
||||
@@ -102,7 +98,6 @@ protected:
|
||||
|
||||
signals:
|
||||
void openFindToolBar();
|
||||
void currentViewerChanged();
|
||||
void sourceChanged(const QUrl &url);
|
||||
void forwardAvailable(bool available);
|
||||
void backwardAvailable(bool available);
|
||||
|
Reference in New Issue
Block a user