summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-07-22 19:31:49 (GMT)
committerMontel Laurent <montel@kde.org>2016-07-22 19:31:49 (GMT)
commit182292dd5cf1174cd60950740981e8d4bd9e0583 (patch)
treeebc57af0dfadf16170e0946982aa0ee492308d72
parentbfd9db82c2fd6af9fde99188c035919bf30992d3 (diff)
Make it compile with QT_NO_CAST_FROM_BYTEARRAY
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/agenda/timelabels.cpp8
-rw-r--r--src/agenda/timescaleconfigdialog.cpp2
3 files changed, 5 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5079ce2..521de7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,8 +66,6 @@ ecm_setup_version(${EVENTVIEW_LIB_VERSION} VARIABLE_PREFIX EVENTVIEWS
########### Targets ###########
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
-remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
-
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5EventViews")
diff --git a/src/agenda/timelabels.cpp b/src/agenda/timelabels.cpp
index a7e61b3..4de3ea4 100644
--- a/src/agenda/timelabels.cpp
+++ b/src/agenda/timelabels.cpp
@@ -57,7 +57,7 @@ TimeLabels::TimeLabels(const QTimeZone &zone, int rows, TimeLabelsZone *parent,
mAgenda = Q_NULLPTR;
if (mTimezone.isValid()) {
- setToolTip(i18n("Timezone:") + i18n(mTimezone.id()));
+ setToolTip(i18n("Timezone:") + i18n(mTimezone.id().constData()));
}
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
@@ -301,7 +301,7 @@ void TimeLabels::contextMenuEvent(QContextMenuEvent *event)
popup.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("&Add Timezones..."));
QAction *removeTimeZone =
popup.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")),
- i18n("&Remove Timezone %1", i18n(mTimezone.id())));
+ i18n("&Remove Timezone %1", i18n(mTimezone.id().constData())));
if (!mTimezone.isValid() ||
!mTimeLabelsZone->preferences()->timeScaleTimezones().count() ||
mTimezone == mTimeLabelsZone->preferences()->timeZone()) {
@@ -334,14 +334,14 @@ QTimeZone TimeLabels::timeZone() const
QString TimeLabels::header() const
{
- return i18n(mTimezone.id());
+ return i18n(mTimezone.id().constData());
}
QString TimeLabels::headerToolTip() const
{
QString toolTip;
toolTip += QLatin1String("<qt>");
- toolTip += i18n("<b>%1</b>", i18n(mTimezone.id()));
+ toolTip += i18n("<b>%1</b>", i18n(mTimezone.id().constData()));
toolTip += QLatin1String("<hr>");
//TODO: Once string freeze is lifted, add UTC offset here
if (mTimezone.country() != QLocale::AnyCountry) {
diff --git a/src/agenda/timescaleconfigdialog.cpp b/src/agenda/timescaleconfigdialog.cpp
index 02a6394..f6f84f1 100644
--- a/src/agenda/timescaleconfigdialog.cpp
+++ b/src/agenda/timescaleconfigdialog.cpp
@@ -76,7 +76,7 @@ static QString tzWithUTC(const QByteArray &zoneId)
auto tz = QTimeZone(zoneId);
return
QStringLiteral("%1 (UTC%2)").
- arg(i18n(zoneId), tzUTCOffsetStr(tz));
+ arg(i18n(zoneId.constData()), tzUTCOffsetStr(tz));
}
TimeScaleConfigDialog::TimeScaleConfigDialog(const PrefsPtr &preferences, QWidget *parent)