author | zecke <zecke> | 2004-10-15 19:23:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-15 19:23:42 (UTC) |
commit | ac36bfe2794741188da1d6d4b471f96fd15d47ee (patch) (unidiff) | |
tree | 5c1bc264fd554142993be8963aed159f32877d6a /library/qpemessagebox.cpp | |
parent | a979ea08e8f9dbade70a9bf4fdc93dcbebb5f3fa (diff) | |
download | opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.zip opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.tar.gz opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.tar.bz2 |
-Add a QPEGLOBAL that adds define for 'weak', 'used' and unused symbols
Make use of the newly added qpeglobal.h to kill custom versions of
similiar macros
-rw-r--r-- | library/qpemessagebox.cpp | 9 |
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,60 +1,55 @@ | |||
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 | 27 | static 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 | |||
32 | static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() ATTRIBUTE_UNUSED; | ||
33 | static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() { | 28 | static 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 | */ |
51 | bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption, | 46 | bool 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| |
57 | QMessageBox::Escape, 0 ); | 52 | QMessageBox::Escape, 0 ); |
58 | 53 | ||
59 | return r == QMessageBox::Yes; | 54 | return r == QMessageBox::Yes; |
60 | } | 55 | } |