summaryrefslogtreecommitdiff
path: root/library/qpemessagebox.cpp
Unidiff
Diffstat (limited to 'library/qpemessagebox.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpemessagebox.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/library/qpemessagebox.cpp b/library/qpemessagebox.cpp
index bf03d31..c38828a 100644
--- a/library/qpemessagebox.cpp
+++ b/library/qpemessagebox.cpp
@@ -2,49 +2,56 @@
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "qpemessagebox.h" 21#include "qpemessagebox.h"
22#include <qtopia/stringutil.h> 22#include <qtopia/stringutil.h>
23 23
24#include <qmessagebox.h> 24#include <qmessagebox.h>
25 25
26static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() { 26#ifdef Q_OS_MACX
27 #define ATTRIBUTE_UNUSED
28#else
29 #define ATTRIBUTE_UNUSED __attribute__((unused))
30#endif
31
32static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() ATTRIBUTE_UNUSED;
33static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() {
27(void)QMessageBox::tr("Yes"); 34(void)QMessageBox::tr("Yes");
28(void)QMessageBox::tr("No"); 35(void)QMessageBox::tr("No");
29} 36}
30 37
31 38
32/*! 39/*!
33 \class QPEMessageBox qpemessagebox.h 40 \class QPEMessageBox qpemessagebox.h
34 \brief A message box that provides yes, no and cancel options. 41 \brief A message box that provides yes, no and cancel options.
35 42
36 \ingroup qtopiaemb 43 \ingroup qtopiaemb
37 */ 44 */
38 45
39/*! 46/*!
40 Displays a QMessageBox with parent \a parent and caption \a caption. 47 Displays a QMessageBox with parent \a parent and caption \a caption.
41 The message displayed is "Are you sure you want to delete: ", 48 The message displayed is "Are you sure you want to delete: ",
42 followed by \a object. 49 followed by \a object.
43 */ 50 */
44bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption, 51bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption,
45 const QString & object ) 52 const QString & object )
46{ 53{
47 QString msg = QObject::tr("<qt>Are you sure you want to delete\n %1?</qt>").arg( Qtopia::escapeString( object ) ); // use <qt> an esacpe String.... 54 QString msg = QObject::tr("<qt>Are you sure you want to delete\n %1?</qt>").arg( Qtopia::escapeString( object ) ); // use <qt> an esacpe String....
48 int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes, 55 int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes,
49 QMessageBox::No|QMessageBox::Default| 56 QMessageBox::No|QMessageBox::Default|
50 QMessageBox::Escape, 0 ); 57 QMessageBox::Escape, 0 );