summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-06-11 11:15:41 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-06-11 11:15:41 (GMT)
commitb487ec78791b08d9a6568f4b0ab7c0479b5124a2 (patch)
tree5f450cd57b314a3ac9ff0e80adfa52c5cd72e124 /src
parent03a86003bc5bd05f0cbfe1c2274f517a175d1ffe (diff)
downloadQt-b487ec78791b08d9a6568f4b0ab7c0479b5124a2.zip
Qt-b487ec78791b08d9a6568f4b0ab7c0479b5124a2.tar.gz
Qt-b487ec78791b08d9a6568f4b0ab7c0479b5124a2.tar.bz2
Doc: Moved the definition of QSymbianLeaveException and fixed the brief description.
Reviewed-by: Trust Me
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/global/qglobal.h90
2 files changed, 48 insertions, 44 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 32c9139..a828e84 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -3258,7 +3258,7 @@ bool QInternal::callFunction(InternalFunction func, void **args)
/*! \class QSymbianLeaveException
\ingroup qts60
- \brief Exception class representing a Symbian leave code.
+ \brief The QSymbianLeaveException class represents a block of Symbian leave code.
\warning This class is only available on Symbian.
*/
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 3d441e3..450fd86 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -2310,6 +2310,50 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathTranslations();
QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#endif
+#if defined(Q_OS_SYMBIAN)
+
+#include <stdexcept>
+
+class QSymbianLeaveException : public std::exception
+{
+public:
+ inline QSymbianLeaveException(int err) : error(err) {}
+ const char* what() const throw();
+public:
+ int error;
+};
+
+Q_CORE_EXPORT void qt_translateSymbianErrorToException(int error);
+Q_CORE_EXPORT void qt_translateExceptionToSymbianErrorL(const std::exception& ex);
+Q_CORE_EXPORT int qt_translateExceptionToSymbianError(const std::exception& ex);
+
+#define QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(f) \
+ { \
+ TInt error; \
+ TRAP(error, f); \
+ if (error) \
+ qt_translateSymbianErrorToException(error); \
+ }
+
+#define QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, f) \
+ { \
+ err = KErrNone; \
+ try { \
+ f; \
+ } catch (const std::exception &ex) { \
+ err = qt_translateExceptionToSymbianError(ex); \
+ } \
+ }
+
+#define QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(f) \
+ { \
+ TInt err; \
+ QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, f) \
+ User::LeaveIfError(err); \
+ }
+#endif
+
+
/*
This gives us the possibility to check which modules the user can
use. These are purely compile time checks and will generate no code.
@@ -2383,6 +2427,9 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#define QT_LICENSED_MODULE(x) \
enum QtValidLicenseFor##x##Module { Licensed##x = true };
+/* qdoc is really unhappy with the following block of preprocessor checks,
+ making it difficult to document classes properly after this point. */
+
#if (QT_EDITION & QT_MODULE_CORE)
QT_LICENSED_MODULE(Core)
#endif
@@ -2465,49 +2512,6 @@ QT_LICENSED_MODULE(DBus)
# define QT_NO_CONCURRENT_FILTER
#endif
-#if defined(Q_OS_SYMBIAN)
-
-#include <stdexcept>
-
-class QSymbianLeaveException : public std::exception
-{
-public:
- inline QSymbianLeaveException(int err) : error(err) {}
- const char* what() const throw();
-public:
- int error;
-};
-
-Q_CORE_EXPORT void qt_translateSymbianErrorToException(int error);
-Q_CORE_EXPORT void qt_translateExceptionToSymbianErrorL(const std::exception& ex);
-Q_CORE_EXPORT int qt_translateExceptionToSymbianError(const std::exception& ex);
-
-#define QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(f) \
- { \
- TInt error; \
- TRAP(error, f); \
- if (error) \
- qt_translateSymbianErrorToException(error); \
- }
-
-#define QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, f) \
- { \
- err = KErrNone; \
- try { \
- f; \
- } catch (const std::exception &ex) { \
- err = qt_translateExceptionToSymbianError(ex); \
- } \
- }
-
-#define QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(f) \
- { \
- TInt err; \
- QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, f) \
- User::LeaveIfError(err); \
- }
-#endif
-
QT_END_NAMESPACE
QT_END_HEADER