summaryrefslogtreecommitdiffstats
path: root/examples/qtmail/app/messagelistview.cpp
diff options
context:
space:
mode:
authorAleksW <qt-info@nokia.com>2010-04-07 19:11:37 +1000
committerAleksW <qt-info@nokia.com>2010-04-07 19:11:37 +1000
commit503b093e811ad727656a9dc9d3080b0ccddf4d8e (patch)
tree78235baa2a3d0fcc13a55d665910cf1e129a8916 /examples/qtmail/app/messagelistview.cpp
parente419215b8c547d4503ed54070b374b63859f0be7 (diff)
Remove dead code
Diffstat (limited to 'examples/qtmail/app/messagelistview.cpp')
-rw-r--r--examples/qtmail/app/messagelistview.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/examples/qtmail/app/messagelistview.cpp b/examples/qtmail/app/messagelistview.cpp
index 869e0e95..8660e261 100644
--- a/examples/qtmail/app/messagelistview.cpp
+++ b/examples/qtmail/app/messagelistview.cpp
@@ -91,7 +91,6 @@ private:
private:
QLineEdit* m_searchTerms;
QComboBox* m_statusCombo;
- QToolButton* m_fullSearchButton;
QToolButton* m_clearButton;
QMailMessageKey m_key;
};
@@ -127,11 +126,6 @@ QWidget(parent)
connect(m_statusCombo,SIGNAL(currentIndexChanged(int)),this,SLOT(searchTermsChanged()));
layout->addWidget(m_statusCombo);
- m_fullSearchButton = new QToolButton(this);
- m_fullSearchButton->setIcon(Qtmail::icon("search"));
- connect(m_fullSearchButton,SIGNAL(clicked(bool)),this,SIGNAL(fullSearchRequested()));
- layout->addWidget(m_fullSearchButton);
-
m_key = buildSearchKey();
}
@@ -159,7 +153,7 @@ QMailMessageKey QuickSearchWidget::buildSearchKey() const
QMailMessageKey statusKey = qvariant_cast<QMailMessageKey>(m_statusCombo->itemData(m_statusCombo->currentIndex()));
if(m_searchTerms->text().isEmpty() && m_statusCombo->currentIndex() == 0)
return statusKey;
-
+
QMailMessageKey subjectKey = QMailMessageKey::subject(m_searchTerms->text(),QMailDataComparator::Includes);
QMailMessageKey senderKey = QMailMessageKey::sender(m_searchTerms->text(),QMailDataComparator::Includes);
return ((subjectKey | senderKey) & statusKey);
@@ -190,7 +184,7 @@ private:
template <typename BaseModel>
MessageListModel<BaseModel>::MessageListModel(MessageListView *parent)
- : BaseModel(parent),
+ : BaseModel(parent),
m_parent(parent)
{
}
@@ -316,7 +310,7 @@ protected:
protected slots:
void rowsInserted(const QModelIndex &parent, int start, int end);
-
+
private:
MessageListView *m_parent;
QPoint pos;
@@ -443,7 +437,7 @@ bool MessageList::mouseOverMoreLink(QMouseEvent* e)
void MessageList::drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
- bool isMoreEntry = (!index.parent().isValid() &&
+ bool isMoreEntry = (!index.parent().isValid() &&
m_parent->moreButtonVisible() &&
(index.row() == (model()->rowCount(QModelIndex()) - 1)));
if (isMoreEntry) {
@@ -514,7 +508,7 @@ void MessageListView::setKey(const QMailMessageKey& newKey)
if (mPreviousCurrentCache[newKeyArray]) {
mPreviousCurrent = *mPreviousCurrentCache[newKeyArray];
}
-
+
mModel->setKey(newKey & mQuickSearchWidget->searchKey());
mExpandAllTimer.start(0);
mScrollTimer.stop();
@@ -547,7 +541,7 @@ void MessageListView::init()
mPreviousCurrentCache.setMaxCost(10000); // Cache current item for 1,000 folders
connect(&mExpandAllTimer, SIGNAL(timeout()),
this, SLOT(expandAll()));
-
+
mQuickSearchWidget = new QuickSearchWidget(this);
connect(mQuickSearchWidget,SIGNAL(quickSearchRequested(QMailMessageKey)),this,SLOT(quickSearch(QMailMessageKey)));
connect(mQuickSearchWidget,SIGNAL(fullSearchRequested()),this,SIGNAL(fullSearchRequested()));
@@ -1046,7 +1040,7 @@ void MessageListView::scrollTo(const QMailMessageId &id)
{
if (!id.isValid())
return;
-
+
QModelIndex index(mModel->indexFromId(id));
if (index.isValid()) {
mMessageList->scrollTo(index);