Commit 182292dd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile with QT_NO_CAST_FROM_BYTEARRAY

parent bfd9db82
......@@ -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")
......
......@@ -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) {
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment