summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/securityplugins/blueping/bluepingplugin.cpp3
-rw-r--r--noncore/securityplugins/notice/noticeConfigWidget.cpp4
-rw-r--r--noncore/securityplugins/notice/noticeConfigWidget.h4
-rw-r--r--noncore/securityplugins/notice/noticeplugin.cpp2
4 files changed, 6 insertions, 7 deletions
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
@@ -17,26 +17,25 @@ using Opie::Security::MultiauthConfigWidget;
/// creates and initializes the m_config Config object
BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) {
m_config = new Config("Security");
m_config->setGroup("BluepingPlugin");
bluetoothAlreadyRestarted = false;
}
/// 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)
QString BluepingPlugin::pluginName() const {
return "Blueping plugin";
}
/// no configuration widget for the moment
MultiauthConfigWidget * BluepingPlugin::configWidget(QWidget * parent) {
return 0l;
}
QString BluepingPlugin::pixmapNameWidget() const {
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
@@ -48,36 +48,36 @@ NoticeConfigWidget::~NoticeConfigWidget()
/// write the notice text in the multiauth.conf Config file
void NoticeConfigWidget::writeConfig()
{
if ( noticeMLE->edited() ) {
odebug << "writing new notice text in Security.conf" << oendl;
setNoticeText(noticeMLE->text());
}
}
/// 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)
/**
* if no text has been defined yet returns defaultNoticeText
*/
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;
}
/// set the notice text in our m_config config file (escaping new lines)
void NoticeConfigWidget::setNoticeText(QString noticeText) {
m_config = new Config("Security");
m_config->setGroup("NoticePlugin");
// since Config files do not allow true newlines, we replace them with litteral "\n"
m_config->writeEntry("noticeText", noticeText.replace( QRegExp("\n"), "\\n" ));
delete m_config;
}
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
@@ -31,32 +31,32 @@
*/
#ifndef NOTICECONFIGWIDGET_H
#define NOTICECONFIGWIDGET_H
#include <qpushbutton.h>
#include <qmultilineedit.h>
#include <qpe/config.h>
#include <opie2/multiauthconfigwidget.h>
-static char defaultNoticeText [] = "<h2>NOTICE TO USERS</h2>\n"
+static char defaultNoticeText [] = QT_TRANSLATE_NOOP( "QObject", "<h2>NOTICE TO USERS</h2>\n"
"<p>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.</p>\n"
"<p><strong>Unauthorized or improper use of this system may result in "
"disciplinary action and civil and criminal penalties. <em>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.</em></strong></p>";
+ "terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>");
class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget {
Q_OBJECT
public:
NoticeConfigWidget(QWidget* parent, const char* name);
virtual ~NoticeConfigWidget();
virtual void writeConfig();
private:
QMultiLineEdit * noticeMLE;
QPushButton * resetNoticeButton;
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
@@ -72,15 +72,15 @@ int NoticePlugin::authenticate() {
case QMessageBox::Yes:
return MultiauthPluginObject::Success;
}
return 255; //should not be returned anyway
}
/// get the notice text from our m_config config file (with true new lines)
/**
* if no text has been defined yet returns defaultNoticeText
*/
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" );
}