summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-11-11 15:56:56 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:06 +0100
commit18bab8c6387257be9d4e3b0cff91e5a9f4605f4a (patch)
treeaae50c1924104c3bd316ced29a5942ff251a1407 /src/tabwindow
parentWARNING: BIG COMMIT (diff)
downloadrekonq-18bab8c6387257be9d4e3b0cff91e5a9f4605f4a.tar.xz
Do not lock UI when add/insert tabs
See qt:qtabwidget#insertTab about.
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/rekonqwindow.cpp46
-rw-r--r--src/tabwindow/rekonqwindow.h8
2 files changed, 54 insertions, 0 deletions
diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp
index 05608954..a401c343 100644
--- a/src/tabwindow/rekonqwindow.cpp
+++ b/src/tabwindow/rekonqwindow.cpp
@@ -354,3 +354,49 @@ bool RekonqWindow::restore(int number, bool show)
}
return false;
}
+
+
+// NOTE: For internal purpose only ------------------------------------------------------
+
+
+int RekonqWindow::addTab(QWidget *page, const QString &label)
+{
+ setUpdatesEnabled(false);
+ int i = KTabWidget::addTab(page, label);
+ setUpdatesEnabled(true);
+
+ return i;
+}
+
+
+int RekonqWindow::addTab(QWidget *page, const QIcon &icon, const QString &label)
+{
+ setUpdatesEnabled(false);
+ int i = KTabWidget::addTab(page, icon, label);
+ setUpdatesEnabled(true);
+
+ return i;
+}
+
+
+int RekonqWindow::insertTab(int index, QWidget *page, const QString &label)
+{
+ setUpdatesEnabled(false);
+ int i = KTabWidget::insertTab(index, page, label);
+ setUpdatesEnabled(true);
+
+ return i;
+}
+
+
+int RekonqWindow::insertTab(int index, QWidget *page, const QIcon &icon, const QString &label)
+{
+ setUpdatesEnabled(false);
+ int i = KTabWidget::insertTab(index, page, icon, label);
+ setUpdatesEnabled(true);
+
+ return i;
+}
+
+
+// --------------------------------------------------------------------------------------
diff --git a/src/tabwindow/rekonqwindow.h b/src/tabwindow/rekonqwindow.h
index 67f0fcfa..6195f6ac 100644
--- a/src/tabwindow/rekonqwindow.h
+++ b/src/tabwindow/rekonqwindow.h
@@ -82,6 +82,14 @@ public:
**/
bool restore(int number, bool show = true);
+ // NOTE: For internal purpose only ------------------------------------------------------
+ int addTab(QWidget *page, const QString &label);
+ int addTab(QWidget *page, const QIcon &icon, const QString &label);
+
+ int insertTab(int index, QWidget *page, const QString &label);
+ int insertTab(int index, QWidget *page, const QIcon &icon, const QString &label);
+ // --------------------------------------------------------------------------------------
+
protected:
/**
* Save your instance-specific properties. The function is