Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3360de6f authored by Laurent Montel's avatar Laurent Montel 😁

Make it build with strict compile flags

parent cdaee70b
......@@ -37,6 +37,12 @@ set_package_properties(KF5DBusAddons PROPERTIES DESCRIPTION "Convenience classes
)
endif ()
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050a00)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
# If libutempter is not available on the system, we build
# kwrited as an executable that is installed with setuid root
# (or setgid utmp) in order to be able to login successfully
......
......@@ -42,7 +42,7 @@
static inline KAboutData aboutData()
{
return KAboutData("kwrited", i18n("kwrited"), PROJECT_VERSION);
return KAboutData(QStringLiteral("kwrited"), i18n("kwrited"), QLatin1String(PROJECT_VERSION));
}
#if defined(BUILD_AS_EXECUTABLE)
......@@ -152,10 +152,10 @@ void KWrited::block_in()
{
QByteArray buf = pty->readAll();
QString msg = QString::fromLocal8Bit( buf.constData(), buf.size() );
msg.remove('\r');
msg.remove('\a');
msg.remove(QLatin1Char('\r'));
msg.remove(QLatin1Char('\a'));
KNotification *notification = new KNotification("NewMessage", nullptr, KNotification::Persistent);
KNotification *notification = new KNotification(QStringLiteral("NewMessage"), nullptr, KNotification::Persistent);
#if !defined(BUILD_AS_EXECUTABLE)
notification->setComponentName( QStringLiteral("kwrited") );
#endif
......
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