summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2016-07-10 12:28:54 +0200
committerDavid Faure <[email protected]>2016-07-10 12:28:54 +0200
commitcff61efd650ec45d9ff54f52e3aa7c91ade52d14 (patch)
tree14afbd167d52ea0957943ac34e6984ed316229d8
parent64803e46a225f4d6b5794408b32104d0ec1ac4cd (diff)
Remove useless container widget around mFolderTreeWidget.
Clearly this was from before the search lineedit moved into FolderTreeWidget. Found in Gammaray.
-rw-r--r--kmail/src/kmmainwidget.cpp24
-rw-r--r--kmail/src/kmmainwidget.h1
2 files changed, 8 insertions, 17 deletions
diff --git a/kmail/src/kmmainwidget.cpp b/kmail/src/kmmainwidget.cpp
index 059b99c..a8a7d31 100644
--- a/kmail/src/kmmainwidget.cpp
+++ b/kmail/src/kmmainwidget.cpp
@@ -632,13 +632,13 @@ void KMMainWidget::layoutSplitters()
mSplitter1 = new QSplitter(this);
mSplitter2 = new QSplitter(mSplitter1);
- QWidget *folderTreeWidget = mSearchAndTree;
+ QWidget *folderTreeWidget = mFolderTreeWidget;
if (mFavoriteCollectionsView) {
mFolderViewSplitter = new QSplitter(Qt::Vertical);
mFolderViewSplitter->setChildrenCollapsible(false);
mFolderViewSplitter->addWidget(mFavoriteCollectionsView);
mFavoriteCollectionsView->setParent(mFolderViewSplitter);
- mFolderViewSplitter->addWidget(mSearchAndTree);
+ mFolderViewSplitter->addWidget(mFolderTreeWidget);
folderTreeWidget = mFolderViewSplitter;
}
@@ -955,7 +955,6 @@ void KMMainWidget::deleteWidgets()
mAkonadiStandardActionManager = Q_NULLPTR;
delete mSplitter1;
mMsgView = Q_NULLPTR;
- mSearchAndTree = Q_NULLPTR;
mFolderViewSplitter = Q_NULLPTR;
mFavoriteCollectionsView = Q_NULLPTR;
mSplitter1 = Q_NULLPTR;
@@ -970,13 +969,14 @@ void KMMainWidget::createWidgets()
// They will be properly reparented in layoutSplitters()
//
- // Create header view and search bar
+ // Create the folder tree
//
FolderTreeWidget::TreeViewOptions opt = FolderTreeWidget::ShowUnreadCount;
opt |= FolderTreeWidget::UseLineEditForFiltering;
opt |= FolderTreeWidget::ShowCollectionStatisticAnimation;
opt |= FolderTreeWidget::DontKeyFilter;
mFolderTreeWidget = new FolderTreeWidget(this, mGUIClient, opt);
+ mFolderTreeWidget->filterFolderLineEdit()->hide();
connect(mFolderTreeWidget->folderTreeView(), SIGNAL(currentChanged(Akonadi::Collection)), this, SLOT(slotFolderChanged(Akonadi::Collection)));
@@ -985,6 +985,10 @@ void KMMainWidget::createWidgets()
connect(mFolderTreeWidget->folderTreeView(), &FolderTreeView::prefereCreateNewTab, this, &KMMainWidget::slotCreateNewTab);
mFolderTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
+
+ //
+ // Create the message pane
+ //
mMessagePane = new CollectionPane(!KMailSettings::self()->startSpecificFolderAtStartup(), KMKernel::self()->entityTreeModel(),
mFolderTreeWidget->folderTreeView()->selectionModel(),
this);
@@ -1033,18 +1037,6 @@ void KMMainWidget::createWidgets()
}
//
- // Create the folder tree
- // the "folder tree" consists of a quicksearch input field and the tree itself
- //
-
- mSearchAndTree = new QWidget(this);
- QVBoxLayout *vboxlayout = new QVBoxLayout;
- vboxlayout->setMargin(0);
- mSearchAndTree->setLayout(vboxlayout);
-
- vboxlayout->addWidget(mFolderTreeWidget);
- mFolderTreeWidget->filterFolderLineEdit()->hide();
- //
// Create the favorite folder view
//
mAkonadiStandardActionManager = new Akonadi::StandardMailActionManager(mGUIClient->actionCollection(), this);
diff --git a/kmail/src/kmmainwidget.h b/kmail/src/kmmainwidget.h
index 40a6202..39166b2 100644
--- a/kmail/src/kmmainwidget.h
+++ b/kmail/src/kmmainwidget.h
@@ -598,7 +598,6 @@ private:
MailCommon::FavoriteCollectionWidget *mFavoriteCollectionsView;
Akonadi::FavoriteCollectionsModel *mFavoritesModel;
- QWidget *mSearchAndTree;
KMReaderWin *mMsgView;
QSplitter *mSplitter1;
QSplitter *mSplitter2;