projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
65f099c
)
Replace deprecated qSort with std::sort
author
Janne Koschinski
<janne@kuschku.de>
Mon, 5 Aug 2019 10:30:19 +0000
(12:30 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 28 Aug 2019 19:45:23 +0000
(21:45 +0200)
src/client/clientbacklogmanager.cpp
patch
|
blob
|
history
src/client/messagefilter.cpp
patch
|
blob
|
history
src/client/messagemodel.cpp
patch
|
blob
|
history
src/client/networkmodel.cpp
patch
|
blob
|
history
src/core/coresessioneventprocessor.cpp
patch
|
blob
|
history
src/qtui/chatview.cpp
patch
|
blob
|
history
src/qtui/chatviewsearchcontroller.cpp
patch
|
blob
|
history
src/qtui/settingspages/bufferviewsettingspage.cpp
patch
|
blob
|
history
src/qtui/settingspages/corehighlightsettingspage.cpp
patch
|
blob
|
history
src/qtui/settingspages/highlightsettingspage.cpp
patch
|
blob
|
history
diff --git
a/src/client/clientbacklogmanager.cpp
b/src/client/clientbacklogmanager.cpp
index
cf6ab5d
..
75ed87a
100644
(file)
--- a/
src/client/clientbacklogmanager.cpp
+++ b/
src/client/clientbacklogmanager.cpp
@@
-164,7
+164,7
@@
void ClientBacklogManager::dispatchMessages(const MessageList& messages, bool so
clock_t start_t = clock();
if (sort)
clock_t start_t = clock();
if (sort)
-
qSort(msgs
);
+
std::sort(msgs.begin(), msgs.end()
);
Client::messageProcessor()->process(msgs);
clock_t end_t = clock();
Client::messageProcessor()->process(msgs);
clock_t end_t = clock();
diff --git
a/src/client/messagefilter.cpp
b/src/client/messagefilter.cpp
index
10c9aa0
..
49676e3
100644
(file)
--- a/
src/client/messagefilter.cpp
+++ b/
src/client/messagefilter.cpp
@@
-115,7
+115,7
@@
QString MessageFilter::idString() const
return "*";
QList<BufferId> bufferIds = _validBuffers.toList();
return "*";
QList<BufferId> bufferIds = _validBuffers.toList();
-
qSort(bufferIds
);
+
std::sort(bufferIds.begin(), bufferIds.end()
);
QStringList bufferIdStrings;
foreach (BufferId id, bufferIds)
QStringList bufferIdStrings;
foreach (BufferId id, bufferIds)
diff --git
a/src/client/messagemodel.cpp
b/src/client/messagemodel.cpp
index
e39c7a3
..
fcd7acb
100644
(file)
--- a/
src/client/messagemodel.cpp
+++ b/
src/client/messagemodel.cpp
@@
-105,13
+105,13
@@
void MessageModel::insertMessages(const QList<Message>& msglist)
else {
_messageBuffer = msglist.mid(processedMsgs);
}
else {
_messageBuffer = msglist.mid(processedMsgs);
}
-
qSort(_messageBuffer
);
+
std::sort(_messageBuffer.begin(), _messageBuffer.end()
);
QCoreApplication::postEvent(this, new ProcessBufferEvent());
}
}
else {
_messageBuffer << msglist;
QCoreApplication::postEvent(this, new ProcessBufferEvent());
}
}
else {
_messageBuffer << msglist;
-
qSort(_messageBuffer
);
+
std::sort(_messageBuffer.begin(), _messageBuffer.end()
);
}
}
}
}
diff --git
a/src/client/networkmodel.cpp
b/src/client/networkmodel.cpp
index
17a9aaa
..
4713932
100644
(file)
--- a/
src/client/networkmodel.cpp
+++ b/
src/client/networkmodel.cpp
@@
-1605,7
+1605,7
@@
void NetworkModel::sortBufferIds(QList<BufferId>& bufferIds) const
bufferItems << _bufferItemCache[bufferId];
}
bufferItems << _bufferItemCache[bufferId];
}
-
qS
ort(bufferItems.begin(), bufferItems.end(), bufferItemLessThan);
+
std::s
ort(bufferItems.begin(), bufferItems.end(), bufferItemLessThan);
bufferIds.clear();
foreach (BufferItem* bufferItem, bufferItems) {
bufferIds.clear();
foreach (BufferItem* bufferItem, bufferItems) {
diff --git
a/src/core/coresessioneventprocessor.cpp
b/src/core/coresessioneventprocessor.cpp
index
af30bfb
..
86b4cde
100644
(file)
--- a/
src/core/coresessioneventprocessor.cpp
+++ b/
src/core/coresessioneventprocessor.cpp
@@
-1536,7
+1536,7
@@
void CoreSessionEventProcessor::handleCtcpClientinfo(CtcpEvent* e)
QStringList supportedHandlers;
for (const QString& handler : providesHandlers())
supportedHandlers << handler.toUpper();
QStringList supportedHandlers;
for (const QString& handler : providesHandlers())
supportedHandlers << handler.toUpper();
-
qSort(supportedHandlers
);
+
std::sort(supportedHandlers.begin(), supportedHandlers.end()
);
e->setReply(supportedHandlers.join(" "));
}
e->setReply(supportedHandlers.join(" "));
}
diff --git
a/src/qtui/chatview.cpp
b/src/qtui/chatview.cpp
index
3a432bf
..
df25b1a
100644
(file)
--- a/
src/qtui/chatview.cpp
+++ b/
src/qtui/chatview.cpp
@@
-292,7
+292,7
@@
QSet<ChatLine*> ChatView::visibleChatLines(Qt::ItemSelectionMode mode) const
QList<ChatLine*> ChatView::visibleChatLinesSorted(Qt::ItemSelectionMode mode) const
{
QList<ChatLine*> result = visibleChatLines(mode).toList();
QList<ChatLine*> ChatView::visibleChatLinesSorted(Qt::ItemSelectionMode mode) const
{
QList<ChatLine*> result = visibleChatLines(mode).toList();
-
qS
ort(result.begin(), result.end(), chatLinePtrLessThan);
+
std::s
ort(result.begin(), result.end(), chatLinePtrLessThan);
return result;
}
return result;
}
diff --git
a/src/qtui/chatviewsearchcontroller.cpp
b/src/qtui/chatviewsearchcontroller.cpp
index
b81e261
..
f53cbc6
100644
(file)
--- a/
src/qtui/chatviewsearchcontroller.cpp
+++ b/
src/qtui/chatviewsearchcontroller.cpp
@@
-330,7
+330,7
@@
void ChatViewSearchController::repositionHighlights(ChatLine* line)
}
}
}
}
-
qS
ort(searchHighlights.begin(), searchHighlights.end(), SearchHighlightItem::firstInLine);
+
std::s
ort(searchHighlights.begin(), searchHighlights.end(), SearchHighlightItem::firstInLine);
Q_ASSERT(wordPos.count() == searchHighlights.count());
for (int i = 0; i < searchHighlights.count(); i++) {
Q_ASSERT(wordPos.count() == searchHighlights.count());
for (int i = 0; i < searchHighlights.count(); i++) {
diff --git
a/src/qtui/settingspages/bufferviewsettingspage.cpp
b/src/qtui/settingspages/bufferviewsettingspage.cpp
index
1097dff
..
aa31d52
100644
(file)
--- a/
src/qtui/settingspages/bufferviewsettingspage.cpp
+++ b/
src/qtui/settingspages/bufferviewsettingspage.cpp
@@
-248,7
+248,7
@@
void BufferViewSettingsPage::newBufferView(const QString& bufferViewName)
}
else {
bufferIds = Client::networkModel()->allBufferIds();
}
else {
bufferIds = Client::networkModel()->allBufferIds();
-
qSort(bufferIds
);
+
std::sort(bufferIds.begin(), bufferIds.end()
);
config->setProperty("OriginalBufferList", toVariantList<BufferId>(bufferIds));
}
}
config->setProperty("OriginalBufferList", toVariantList<BufferId>(bufferIds));
}
}
diff --git
a/src/qtui/settingspages/corehighlightsettingspage.cpp
b/src/qtui/settingspages/corehighlightsettingspage.cpp
index
9707c70
..
46b9dd9
100644
(file)
--- a/
src/qtui/settingspages/corehighlightsettingspage.cpp
+++ b/
src/qtui/settingspages/corehighlightsettingspage.cpp
@@
-420,7
+420,7
@@
void CoreHighlightSettingsPage::removeSelectedHighlightRows()
for (auto selectedItem : selectedItemList) {
selectedRows.append(selectedItem->row());
}
for (auto selectedItem : selectedItemList) {
selectedRows.append(selectedItem->row());
}
-
qSort(selectedRows.begin(), selectedRows.end(), qGreater<int
>());
+
std::sort(selectedRows.begin(), selectedRows.end(), std::greater<
>());
int lastRow = -1;
for (auto row : selectedRows) {
if (row != lastRow) {
int lastRow = -1;
for (auto row : selectedRows) {
if (row != lastRow) {
@@
-438,7
+438,7
@@
void CoreHighlightSettingsPage::removeSelectedIgnoredRows()
for (auto selectedItem : selectedItemList) {
selectedRows.append(selectedItem->row());
}
for (auto selectedItem : selectedItemList) {
selectedRows.append(selectedItem->row());
}
-
qSort(selectedRows.begin(), selectedRows.end(), qGreater<int
>());
+
std::sort(selectedRows.begin(), selectedRows.end(), std::greater<
>());
int lastRow = -1;
for (auto row : selectedRows) {
if (row != lastRow) {
int lastRow = -1;
for (auto row : selectedRows) {
if (row != lastRow) {
diff --git
a/src/qtui/settingspages/highlightsettingspage.cpp
b/src/qtui/settingspages/highlightsettingspage.cpp
index
1a6a51a
..
3eebd91
100644
(file)
--- a/
src/qtui/settingspages/highlightsettingspage.cpp
+++ b/
src/qtui/settingspages/highlightsettingspage.cpp
@@
-197,7
+197,7
@@
void HighlightSettingsPage::removeSelectedRows()
foreach (QTableWidgetItem* selectedItem, selectedItemList) {
selectedRows.append(selectedItem->row());
}
foreach (QTableWidgetItem* selectedItem, selectedItemList) {
selectedRows.append(selectedItem->row());
}
-
qSort(selectedRows.begin(), selectedRows.end(), qGreater<int
>());
+
std::sort(selectedRows.begin(), selectedRows.end(), std::greater<
>());
int lastRow = -1;
foreach (int row, selectedRows) {
if (row != lastRow) {
int lastRow = -1;
foreach (int row, selectedRows) {
if (row != lastRow) {