From 872d24ff104d9ea9a7ea8ef68c8b3f98531ed677 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 17 Jul 2004 20:29:06 +0000 Subject: Be less verbose clean ups --- (limited to 'noncore') diff --git a/noncore/securityplugins/blueping/bluepingplugin.cpp b/noncore/securityplugins/blueping/bluepingplugin.cpp index f4c5e95..05fd3c2 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.cpp +++ b/noncore/securityplugins/blueping/bluepingplugin.cpp @@ -26,8 +26,7 @@ BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) { /// deletes the m_config Config object and noticeW if necessary BluepingPlugin::~BluepingPlugin() { delete m_config; - if (m_ping != 0) - delete m_ping; + delete m_ping; } /// Simply return its name (Blueping plugin) diff --git a/noncore/securityplugins/notice/noticeConfigWidget.cpp b/noncore/securityplugins/notice/noticeConfigWidget.cpp index e532232..e0468a7 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.cpp +++ b/noncore/securityplugins/notice/noticeConfigWidget.cpp @@ -57,7 +57,7 @@ void NoticeConfigWidget::writeConfig() /// reset the notice text to the hard-coded example defaultNoticeText void NoticeConfigWidget::resetNotice() { - noticeMLE->setText(defaultNoticeText); + noticeMLE->setText(QObject::tr(defaultNoticeText)); } /// get the notice text from the config file (with true new lines) @@ -68,7 +68,7 @@ QString NoticeConfigWidget::getNoticeText() { m_config = new Config("Security"); m_config->setGroup("NoticePlugin"); // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp - QString noticeText = m_config->readEntry("noticeText", defaultNoticeText).replace( QRegExp("\\\\n"), "\n" ); + QString noticeText = m_config->readEntry("noticeText", QObject::tr(defaultNoticeText) ).replace( QRegExp("\\\\n"), "\n" ); delete m_config; return noticeText; } diff --git a/noncore/securityplugins/notice/noticeConfigWidget.h b/noncore/securityplugins/notice/noticeConfigWidget.h index c90484c..f8847e4 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.h +++ b/noncore/securityplugins/notice/noticeConfigWidget.h @@ -40,14 +40,14 @@ #include -static char defaultNoticeText [] = "

NOTICE TO USERS

\n" +static char defaultNoticeText [] = QT_TRANSLATE_NOOP( "QObject", "

NOTICE TO USERS

\n" "

This is a private computer system and is the property of " "the company XXX / Mr or Ms X. It is for authorized " "use only. Users have no expectation of privacy.

\n" "

Unauthorized or improper use of this system may result in " "disciplinary action and civil and criminal penalties. By continuing to use " "this system you indicate your awareness of and consent to these " - "terms. LOG OFF IMMEDIATELY if you do not agree to them.

"; + "terms. LOG OFF IMMEDIATELY if you do not agree to them.

"); class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget { diff --git a/noncore/securityplugins/notice/noticeplugin.cpp b/noncore/securityplugins/notice/noticeplugin.cpp index 25a452a..1da260a 100644 --- a/noncore/securityplugins/notice/noticeplugin.cpp +++ b/noncore/securityplugins/notice/noticeplugin.cpp @@ -81,6 +81,6 @@ int NoticePlugin::authenticate() { */ QString NoticePlugin::getNoticeText() { // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp - return m_config->readEntry("noticeText", defaultNoticeText).replace( QRegExp("\\\\n"), "\n" ); + return m_config->readEntry("noticeText", QObject::tr(defaultNoticeText)).replace( QRegExp("\\\\n"), "\n" ); } -- cgit v0.9.0.2