summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/buddylistview.cpp8
-rw-r--r--src/gui/getaddressform.cpp4
-rw-r--r--src/gui/historyform.cpp4
-rw-r--r--src/gui/main.cpp4
-rw-r--r--src/gui/messageform.cpp16
5 files changed, 0 insertions, 36 deletions
diff --git a/src/gui/buddylistview.cpp b/src/gui/buddylistview.cpp
index 3991466..38d89ae 100644
--- a/src/gui/buddylistview.cpp
+++ b/src/gui/buddylistview.cpp
@@ -70,11 +70,7 @@ void BuddyListViewItem::set_icon(void) {
QString address = QString::fromStdString(ui->format_sip_address(user_config, buddy->get_name(), t_url(url_str)));
tip = "<html>";
-#if QT_VERSION >= 0x050000
tip += address.toHtmlEscaped().replace(' ', "&nbsp;");
-#else
- tip += Qt::escape(address).replace(' ', "&nbsp;");
-#endif
if (!buddy->get_may_subscribe_presence()) {
setData(0, Qt::DecorationRole, QPixmap(":/icons/images/buddy.png"));
@@ -163,11 +159,7 @@ void BLViewUserItem::set_icon(void) {
QString profile_name = QString::fromStdString(presence_epa->get_user_profile()->get_profile_name());
tip = "<html>";
-#if QT_VERSION >= 0x050000
tip += profile_name.toHtmlEscaped();
-#else
- tip += Qt::escape(profile_name);
-#endif
tip += "<br>";
tip += "<b>";
tip += qApp->translate("BuddyList", "Availability");
diff --git a/src/gui/getaddressform.cpp b/src/gui/getaddressform.cpp
index b513967..06521d2 100644
--- a/src/gui/getaddressform.cpp
+++ b/src/gui/getaddressform.cpp
@@ -52,11 +52,7 @@ GetAddressForm::GetAddressForm(QWidget *parent)
localListView->sortByColumn(COL_ADDR_NAME, Qt::AscendingOrder);
-#if QT_VERSION >= 0x050000
localListView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
-#else
- localListView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
-#endif
}
GetAddressForm::~GetAddressForm()
diff --git a/src/gui/historyform.cpp b/src/gui/historyform.cpp
index 2281840..efa702a 100644
--- a/src/gui/historyform.cpp
+++ b/src/gui/historyform.cpp
@@ -78,11 +78,7 @@ void HistoryForm::init()
m_model->setHorizontalHeaderLabels(QStringList() << tr("Time") << tr("In/Out") << tr("From/To") << tr("Subject") << tr("Status"));
historyListView->horizontalHeader()->setSortIndicator(HISTCOL_TIMESTAMP, Qt::DescendingOrder);
-#if QT_VERSION >= 0x050000
historyListView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
-#else
- historyListView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
-#endif
connect(historyListView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(showCallDetails(QModelIndex)));
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index a0f5d29..a402d41 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -511,10 +511,6 @@ QApplication *create_user_interface(bool cli_mode, int argc, char **argv, QTrans
qa = new t_twinkle_application(tmp, argv);
MEMMAN_NEW(qa);
#endif
-#if QT_VERSION < 0x050000 // In Qt5, these functions are removed. UTF-8 is the default.
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
- QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
-#endif
g_gui_state = new QSettings(QDir::home().absoluteFilePath(QString("%1/%2").arg(DIR_USER).arg("gui_state.ini")),
QSettings::IniFormat, qa);
diff --git a/src/gui/messageform.cpp b/src/gui/messageform.cpp
index 06ce7bd..a476cfc 100644
--- a/src/gui/messageform.cpp
+++ b/src/gui/messageform.cpp
@@ -317,11 +317,7 @@ void MessageForm::addMessage(const im::t_msg &msg, const QString &name)
// Timestamp and name of sender
if (msg.direction == im::MSG_DIR_IN) s += "<font color=\"blue\">";
s += time2str(msg.timestamp, "%H:%M:%S ").c_str();
-#if QT_VERSION >= 0x050000
s += name.toHtmlEscaped();
-#else
- s += Qt::escape(name);
-#endif
if (msg.direction == im::MSG_DIR_IN) s += "</font>";
s += "</b>";
@@ -340,11 +336,7 @@ void MessageForm::addMessage(const im::t_msg &msg, const QString &name)
if (msg.format == im::TXT_HTML) {
s += msg.message.c_str();
} else {
-#if QT_VERSION >= 0x050000
s += QString::fromStdString(msg.message).toHtmlEscaped();
-#else
- s += Qt::escape(msg.message.c_str());
-#endif
}
}
@@ -435,11 +427,7 @@ void MessageForm::displayError(const QString &errorMsg)
s += "<b>";
s += tr("Delivery failure");
s += ": </b>";
-#if QT_VERSION >= 0x050000
s += errorMsg.toHtmlEscaped();
-#else
- s += Qt::escape(errorMsg);
-#endif
s += "</font>";
conversationBrowser->append(s);
@@ -451,11 +439,7 @@ void MessageForm::displayDeliveryNotification(const QString &notification)
s += "<b>";
s += tr("Delivery notification");
s += ": </b>";
-#if QT_VERSION >= 0x050000
s += notification.toHtmlEscaped();
-#else
- s += Qt::escape(notification);
-#endif
s += "</font>";
conversationBrowser->append(s);