aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/list
diff options
context:
space:
mode:
authorGravatar ctrlaltca2023-07-08 01:38:33 +0200
committerGravatar GitHub2023-07-08 01:38:33 +0200
commit28292170d8c02743cabfabba3a1623b8d71b9aa2 (patch)
tree03c7269f527a40a5b86863db7c111f2552afe46c /src/modules/list
parentMerge branch 'bugfix/script-editor-out-of-range-exception' (diff)
downloadKVIrc-28292170d8c02743cabfabba3a1623b8d71b9aa2.tar.gz
KVIrc-28292170d8c02743cabfabba3a1623b8d71b9aa2.tar.bz2
KVIrc-28292170d8c02743cabfabba3a1623b8d71b9aa2.zip
Port to (and require) Qt 5.15. Drop KDE4 support, fix KDE5 (#2541)
* Port to (and require) Qt 5.15. Drop KDE4 support, implement KDE5 support where needed. --------- Co-authored-by: Fabio Bas <fabio.bas@officineinformatiche.net>
Diffstat (limited to 'src/modules/list')
-rw-r--r--src/modules/list/ListWindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/list/ListWindow.cpp b/src/modules/list/ListWindow.cpp
index 8a52f28e8..aa1777ebe 100644
--- a/src/modules/list/ListWindow.cpp
+++ b/src/modules/list/ListWindow.cpp
@@ -120,18 +120,18 @@ QSize ChannelTreeWidgetItemDelegate::sizeHint(const QStyleOptionViewItem & sovIt
{
case 0:
//channel
- return QSize(fm.width(item->itemData()->m_szChan), iHeight);
+ return QSize(fm.horizontalAdvance(item->itemData()->m_szChan), iHeight);
break;
case 1:
//users
- return QSize(fm.width(item->itemData()->m_szUsers.toInt()), iHeight);
+ return QSize(fm.horizontalAdvance(item->itemData()->m_szUsers.toInt()), iHeight);
break;
case 2:
default:
//topic
if(item->itemData()->m_szStrippedTopic.isEmpty())
item->itemData()->m_szStrippedTopic = KviControlCodes::stripControlBytes(item->itemData()->m_szTopic);
- return QSize(fm.width(item->itemData()->m_szStrippedTopic), iHeight);
+ return QSize(fm.horizontalAdvance(item->itemData()->m_szStrippedTopic), iHeight);
break;
}
//make gcc happy
@@ -275,7 +275,7 @@ ListWindow::~ListWindow()
void ListWindow::getBaseLogFileName(QString & szBuffer)
{
- szBuffer.sprintf("LIST_%d", context()->id());
+ szBuffer = QString::asprintf("LIST_%d", context()->id());
}
void ListWindow::requestList()
@@ -382,7 +382,7 @@ void ListWindow::exportList()
szDate = date.toString(Qt::ISODate);
break;
case 2:
- szDate = date.toString(Qt::SystemLocaleShortDate);
+ szDate = QLocale().toString(date, QLocale::ShortFormat);
break;
}
szFile = QString(__tr2qs("Channel list for %1 - %2")).arg(connection()->currentNetworkName(), szDate);