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, 2 insertions, 7 deletions
diff --git a/library/qpemessagebox.cpp b/library/qpemessagebox.cpp
index c38828a..1df108a 100644
--- a/library/qpemessagebox.cpp
+++ b/library/qpemessagebox.cpp
@@ -1,56 +1,51 @@
1/********************************************************************** 1/**********************************************************************
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 "qpeglobal.h"
22#include <qtopia/stringutil.h> 23#include <qtopia/stringutil.h>
23 24
24#include <qmessagebox.h> 25#include <qmessagebox.h>
25 26
26#ifdef Q_OS_MACX 27static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() QPE_SYMBOL_UNUSED;
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() { 28static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() {
34(void)QMessageBox::tr("Yes"); 29(void)QMessageBox::tr("Yes");
35(void)QMessageBox::tr("No"); 30(void)QMessageBox::tr("No");
36} 31}
37 32
38 33
39/*! 34/*!
40 \class QPEMessageBox qpemessagebox.h 35 \class QPEMessageBox qpemessagebox.h
41 \brief A message box that provides yes, no and cancel options. 36 \brief A message box that provides yes, no and cancel options.
42 37
43 \ingroup qtopiaemb 38 \ingroup qtopiaemb
44 */ 39 */
45 40
46/*! 41/*!
47 Displays a QMessageBox with parent \a parent and caption \a caption. 42 Displays a QMessageBox with parent \a parent and caption \a caption.
48 The message displayed is "Are you sure you want to delete: ", 43 The message displayed is "Are you sure you want to delete: ",
49 followed by \a object. 44 followed by \a object.
50 */ 45 */
51bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption, 46bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption,
52 const QString & object ) 47 const QString & object )
53{ 48{
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.... 49 QString msg = QObject::tr("<qt>Are you sure you want to delete\n %1?</qt>").arg( Qtopia::escapeString( object ) ); // use <qt> an esacpe String....
55 int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes, 50 int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes,
56 QMessageBox::No|QMessageBox::Default| 51 QMessageBox::No|QMessageBox::Default|