projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
219d124
)
qa: Remove dead code
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Sun, 18 Nov 2018 19:51:01 +0000
(20:51 +0100)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Sun, 18 Nov 2018 23:59:46 +0000
(
00:59
+0100)
src/client/networkmodel.cpp
patch
|
blob
|
history
src/qtui/settingspages/shortcutsmodel.cpp
patch
|
blob
|
history
src/uisupport/bufferview.cpp
patch
|
blob
|
history
src/uisupport/bufferview.h
patch
|
blob
|
history
diff --git
a/src/client/networkmodel.cpp
b/src/client/networkmodel.cpp
index
752eb1e
..
423be8b
100644
(file)
--- a/
src/client/networkmodel.cpp
+++ b/
src/client/networkmodel.cpp
@@
-405,7
+405,6
@@
bool BufferItem::setData(int column, const QVariant& value, int role)
default:
return PropertyMapItem::setData(column, value, role);
}
default:
return PropertyMapItem::setData(column, value, role);
}
- return true;
}
void BufferItem::setBufferName(const QString& name)
}
void BufferItem::setBufferName(const QString& name)
diff --git
a/src/qtui/settingspages/shortcutsmodel.cpp
b/src/qtui/settingspages/shortcutsmodel.cpp
index
0cf3f5e
..
0f81564
100644
(file)
--- a/
src/qtui/settingspages/shortcutsmodel.cpp
+++ b/
src/qtui/settingspages/shortcutsmodel.cpp
@@
-77,19
+77,9
@@
QModelIndex ShortcutsModel::index(int row, int column, const QModelIndex& parent
return createIndex(row, column, _categoryItems.at(row));
}
return createIndex(row, column, _categoryItems.at(row));
}
-int ShortcutsModel::columnCount(const QModelIndex&
parent
) const
+int ShortcutsModel::columnCount(const QModelIndex&) const
{
return 2;
{
return 2;
- if (!parent.isValid())
- return 2;
-
- auto* item = static_cast<Item*>(parent.internalPointer());
- Q_ASSERT(item);
-
- if (!item->parentItem)
- return 2;
-
- return 2;
}
int ShortcutsModel::rowCount(const QModelIndex& parent) const
}
int ShortcutsModel::rowCount(const QModelIndex& parent) const
diff --git
a/src/uisupport/bufferview.cpp
b/src/uisupport/bufferview.cpp
index
9711755
..
645634b
100644
(file)
--- a/
src/uisupport/bufferview.cpp
+++ b/
src/uisupport/bufferview.cpp
@@
-575,24
+575,6
@@
void BufferView::filterTextChanged(const QString& filterString)
on_configChanged(); // make sure collapsation is correct
}
on_configChanged(); // make sure collapsation is correct
}
-QSize BufferView::sizeHint() const
-{
- return TreeViewTouch::sizeHint();
-
- if (!model())
- return TreeViewTouch::sizeHint();
-
- if (model()->rowCount() == 0)
- return {120, 50};
-
- int columnSize = 0;
- for (int i = 0; i < model()->columnCount(); i++) {
- if (!isColumnHidden(i))
- columnSize += sizeHintForColumn(i);
- }
- return {columnSize, 50};
-}
-
void BufferView::changeHighlight(BufferView::Direction direction)
{
// If for some weird reason we get a new delegate
void BufferView::changeHighlight(BufferView::Direction direction)
{
// If for some weird reason we get a new delegate
diff --git
a/src/uisupport/bufferview.h
b/src/uisupport/bufferview.h
index
a654aed
..
2b8f1bc
100644
(file)
--- a/
src/uisupport/bufferview.h
+++ b/
src/uisupport/bufferview.h
@@
-83,7
+83,6
@@
protected:
void dropEvent(QDropEvent* event) override;
void rowsInserted(const QModelIndex& parent, int start, int end) override;
void wheelEvent(QWheelEvent*) override;
void dropEvent(QDropEvent* event) override;
void rowsInserted(const QModelIndex& parent, int start, int end) override;
void wheelEvent(QWheelEvent*) override;
- QSize sizeHint() const override;
void focusInEvent(QFocusEvent* event) override { QAbstractScrollArea::focusInEvent(event); }
void contextMenuEvent(QContextMenuEvent* event) override;
void focusInEvent(QFocusEvent* event) override { QAbstractScrollArea::focusInEvent(event); }
void contextMenuEvent(QContextMenuEvent* event) override;