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 ...@@ -66,8 +66,6 @@ ecm_setup_version(${EVENTVIEW_LIB_VERSION} VARIABLE_PREFIX EVENTVIEWS
########### Targets ########### ########### Targets ###########
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
########### CMake Config Files ########### ########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5EventViews") set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5EventViews")
......
...@@ -57,7 +57,7 @@ TimeLabels::TimeLabels(const QTimeZone &zone, int rows, TimeLabelsZone *parent, ...@@ -57,7 +57,7 @@ TimeLabels::TimeLabels(const QTimeZone &zone, int rows, TimeLabelsZone *parent,
mAgenda = Q_NULLPTR; mAgenda = Q_NULLPTR;
if (mTimezone.isValid()) { if (mTimezone.isValid()) {
setToolTip(i18n("Timezone:") + i18n(mTimezone.id())); setToolTip(i18n("Timezone:") + i18n(mTimezone.id().constData()));
} }
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
...@@ -301,7 +301,7 @@ void TimeLabels::contextMenuEvent(QContextMenuEvent *event) ...@@ -301,7 +301,7 @@ void TimeLabels::contextMenuEvent(QContextMenuEvent *event)
popup.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("&Add Timezones...")); popup.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("&Add Timezones..."));
QAction *removeTimeZone = QAction *removeTimeZone =
popup.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), 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() || if (!mTimezone.isValid() ||
!mTimeLabelsZone->preferences()->timeScaleTimezones().count() || !mTimeLabelsZone->preferences()->timeScaleTimezones().count() ||
mTimezone == mTimeLabelsZone->preferences()->timeZone()) { mTimezone == mTimeLabelsZone->preferences()->timeZone()) {
...@@ -334,14 +334,14 @@ QTimeZone TimeLabels::timeZone() const ...@@ -334,14 +334,14 @@ QTimeZone TimeLabels::timeZone() const
QString TimeLabels::header() const QString TimeLabels::header() const
{ {
return i18n(mTimezone.id()); return i18n(mTimezone.id().constData());
} }
QString TimeLabels::headerToolTip() const QString TimeLabels::headerToolTip() const
{ {
QString toolTip; QString toolTip;
toolTip += QLatin1String("<qt>"); toolTip += QLatin1String("<qt>");
toolTip += i18n("<b>%1</b>", i18n(mTimezone.id())); toolTip += i18n("<b>%1</b>", i18n(mTimezone.id().constData()));
toolTip += QLatin1String("<hr>"); toolTip += QLatin1String("<hr>");
//TODO: Once string freeze is lifted, add UTC offset here //TODO: Once string freeze is lifted, add UTC offset here
if (mTimezone.country() != QLocale::AnyCountry) { if (mTimezone.country() != QLocale::AnyCountry) {
......
...@@ -76,7 +76,7 @@ static QString tzWithUTC(const QByteArray &zoneId) ...@@ -76,7 +76,7 @@ static QString tzWithUTC(const QByteArray &zoneId)
auto tz = QTimeZone(zoneId); auto tz = QTimeZone(zoneId);
return return
QStringLiteral("%1 (UTC%2)"). QStringLiteral("%1 (UTC%2)").
arg(i18n(zoneId), tzUTCOffsetStr(tz)); arg(i18n(zoneId.constData()), tzUTCOffsetStr(tz));
} }
TimeScaleConfigDialog::TimeScaleConfigDialog(const PrefsPtr &preferences, QWidget *parent) 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