summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorkh <qtc-committer@nokia.com>2009-05-18 15:23:34 (GMT)
committerkh <qtc-committer@nokia.com>2009-05-18 15:23:34 (GMT)
commit0266129d26695987e93c3c3f856e8353a5d7cd89 (patch)
tree68008fe5bddc19beff4c08987ca54f24250ed7c1 /tools/assistant
parent03069de9c398fe7a787388e61badb09ae1b1e6b7 (diff)
downloadQt-0266129d26695987e93c3c3f856e8353a5d7cd89.zip
Qt-0266129d26695987e93c3c3f856e8353a5d7cd89.tar.gz
Qt-0266129d26695987e93c3c3f856e8353a5d7cd89.tar.bz2
Make sure we add the progress bar only once.
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index b0c2c6b..582eef3 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -926,25 +926,27 @@ void MainWindow::expandTOC(int depth)
void MainWindow::indexingStarted()
{
- m_progressWidget = new QWidget();
- QLayout* hlayout = new QHBoxLayout(m_progressWidget);
+ if (!m_progressWidget) {
+ m_progressWidget = new QWidget();
+ QLayout* hlayout = new QHBoxLayout(m_progressWidget);
- QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
- QLabel *label = new QLabel(tr("Updating search index"));
- label->setSizePolicy(sizePolicy);
- hlayout->addWidget(label);
+ QLabel *label = new QLabel(tr("Updating search index"));
+ label->setSizePolicy(sizePolicy);
+ hlayout->addWidget(label);
- QProgressBar *progressBar = new QProgressBar();
- progressBar->setRange(0, 0);
- progressBar->setTextVisible(false);
- progressBar->setSizePolicy(sizePolicy);
+ QProgressBar *progressBar = new QProgressBar();
+ progressBar->setRange(0, 0);
+ progressBar->setTextVisible(false);
+ progressBar->setSizePolicy(sizePolicy);
- hlayout->setSpacing(6);
- hlayout->setMargin(0);
- hlayout->addWidget(progressBar);
+ hlayout->setSpacing(6);
+ hlayout->setMargin(0);
+ hlayout->addWidget(progressBar);
- statusBar()->addPermanentWidget(m_progressWidget);
+ statusBar()->addPermanentWidget(m_progressWidget);
+ }
}
void MainWindow::indexingFinished()