summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-02-15 18:49:06 +0900
committerMichele Calgaro <[email protected]>2024-02-15 18:58:23 +0900
commit1d318a47b0b45a7f916f526de60d628302cbfd4c (patch)
tree40e178533acb193432ab512d05eb3f03ff4a855c /src
parent67bff2edcacb208dc44dcd521386bef686dc6dbf (diff)
downloadtqt3-1d318a47b0b45a7f916f526de60d628302cbfd4c.tar.gz
tqt3-1d318a47b0b45a7f916f526de60d628302cbfd4c.zip
Replace QT_STATIC_CONST_* with actual definitions
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/kernel/ntqnamespace.h72
-rw-r--r--src/kernel/qcolor.cpp38
-rw-r--r--src/kernel/qcursor_x11.cpp34
-rw-r--r--src/sql/ntqsqldatabase.h2
-rw-r--r--src/sql/qsqldatabase.cpp2
-rw-r--r--src/tools/ntqglobal.h13
-rw-r--r--src/tools/ntqstring.h12
-rw-r--r--src/tools/qstring.cpp12
8 files changed, 86 insertions, 99 deletions
diff --git a/src/kernel/ntqnamespace.h b/src/kernel/ntqnamespace.h
index 218529349..14b4a67e1 100644
--- a/src/kernel/ntqnamespace.h
+++ b/src/kernel/ntqnamespace.h
@@ -52,25 +52,25 @@ class TQCursor;
class TQ_EXPORT TQt {
public:
- QT_STATIC_CONST TQColor & color0;
- QT_STATIC_CONST TQColor & color1;
- QT_STATIC_CONST TQColor & black;
- QT_STATIC_CONST TQColor & white;
- QT_STATIC_CONST TQColor & darkGray;
- QT_STATIC_CONST TQColor & gray;
- QT_STATIC_CONST TQColor & lightGray;
- QT_STATIC_CONST TQColor & red;
- QT_STATIC_CONST TQColor & green;
- QT_STATIC_CONST TQColor & blue;
- QT_STATIC_CONST TQColor & cyan;
- QT_STATIC_CONST TQColor & magenta;
- QT_STATIC_CONST TQColor & yellow;
- QT_STATIC_CONST TQColor & darkRed;
- QT_STATIC_CONST TQColor & darkGreen;
- QT_STATIC_CONST TQColor & darkBlue;
- QT_STATIC_CONST TQColor & darkCyan;
- QT_STATIC_CONST TQColor & darkMagenta;
- QT_STATIC_CONST TQColor & darkYellow;
+ static const TQColor & color0;
+ static const TQColor & color1;
+ static const TQColor & black;
+ static const TQColor & white;
+ static const TQColor & darkGray;
+ static const TQColor & gray;
+ static const TQColor & lightGray;
+ static const TQColor & red;
+ static const TQColor & green;
+ static const TQColor & blue;
+ static const TQColor & cyan;
+ static const TQColor & magenta;
+ static const TQColor & yellow;
+ static const TQColor & darkRed;
+ static const TQColor & darkGreen;
+ static const TQColor & darkBlue;
+ static const TQColor & darkCyan;
+ static const TQColor & darkMagenta;
+ static const TQColor & darkYellow;
// documented in qevent.cpp
enum ButtonState { // mouse/keyboard state values
@@ -892,25 +892,25 @@ public:
// Global cursors
- QT_STATIC_CONST TQCursor & arrowCursor; // standard arrow cursor
- QT_STATIC_CONST TQCursor & upArrowCursor; // upwards arrow
- QT_STATIC_CONST TQCursor & crossCursor; // crosshair
- QT_STATIC_CONST TQCursor & waitCursor; // hourglass/watch
- QT_STATIC_CONST TQCursor & ibeamCursor; // ibeam/text entry
- QT_STATIC_CONST TQCursor & sizeVerCursor; // vertical resize
- QT_STATIC_CONST TQCursor & sizeHorCursor; // horizontal resize
- QT_STATIC_CONST TQCursor & sizeBDiagCursor; // diagonal resize (/)
- QT_STATIC_CONST TQCursor & sizeFDiagCursor; // diagonal resize (\)
- QT_STATIC_CONST TQCursor & sizeAllCursor; // all directions resize
- QT_STATIC_CONST TQCursor & blankCursor; // blank/invisible cursor
- QT_STATIC_CONST TQCursor & splitVCursor; // vertical bar with left-right
+ static const TQCursor & arrowCursor; // standard arrow cursor
+ static const TQCursor & upArrowCursor; // upwards arrow
+ static const TQCursor & crossCursor; // crosshair
+ static const TQCursor & waitCursor; // hourglass/watch
+ static const TQCursor & ibeamCursor; // ibeam/text entry
+ static const TQCursor & sizeVerCursor; // vertical resize
+ static const TQCursor & sizeHorCursor; // horizontal resize
+ static const TQCursor & sizeBDiagCursor; // diagonal resize (/)
+ static const TQCursor & sizeFDiagCursor; // diagonal resize (\)
+ static const TQCursor & sizeAllCursor; // all directions resize
+ static const TQCursor & blankCursor; // blank/invisible cursor
+ static const TQCursor & splitVCursor; // vertical bar with left-right
// arrows
- QT_STATIC_CONST TQCursor & splitHCursor; // horizontal bar with up-down
+ static const TQCursor & splitHCursor; // horizontal bar with up-down
// arrows
- QT_STATIC_CONST TQCursor & pointingHandCursor; // pointing hand
- QT_STATIC_CONST TQCursor & forbiddenCursor; // forbidden cursor (slashed circle)
- QT_STATIC_CONST TQCursor & whatsThisCursor; // arrow with a question mark
- QT_STATIC_CONST TQCursor & busyCursor; // arrow with hourglass
+ static const TQCursor & pointingHandCursor; // pointing hand
+ static const TQCursor & forbiddenCursor; // forbidden cursor (slashed circle)
+ static const TQCursor & whatsThisCursor; // arrow with a question mark
+ static const TQCursor & busyCursor; // arrow with hourglass
enum TextFormat {
diff --git a/src/kernel/qcolor.cpp b/src/kernel/qcolor.cpp
index 6278730f6..0e74dc462 100644
--- a/src/kernel/qcolor.cpp
+++ b/src/kernel/qcolor.cpp
@@ -199,25 +199,25 @@ static TQColor stdcol[19] = {
static TQColor stdcol[19];
#endif
-QT_STATIC_CONST_IMPL TQColor & TQt::color0 = stdcol[0];
-QT_STATIC_CONST_IMPL TQColor & TQt::color1 = stdcol[1];
-QT_STATIC_CONST_IMPL TQColor & TQt::black = stdcol[2];
-QT_STATIC_CONST_IMPL TQColor & TQt::white = stdcol[3];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkGray = stdcol[4];
-QT_STATIC_CONST_IMPL TQColor & TQt::gray = stdcol[5];
-QT_STATIC_CONST_IMPL TQColor & TQt::lightGray = stdcol[6];
-QT_STATIC_CONST_IMPL TQColor & TQt::red = stdcol[7];
-QT_STATIC_CONST_IMPL TQColor & TQt::green = stdcol[8];
-QT_STATIC_CONST_IMPL TQColor & TQt::blue = stdcol[9];
-QT_STATIC_CONST_IMPL TQColor & TQt::cyan = stdcol[10];
-QT_STATIC_CONST_IMPL TQColor & TQt::magenta = stdcol[11];
-QT_STATIC_CONST_IMPL TQColor & TQt::yellow = stdcol[12];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkRed = stdcol[13];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkGreen = stdcol[14];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkBlue = stdcol[15];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkCyan = stdcol[16];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkMagenta = stdcol[17];
-QT_STATIC_CONST_IMPL TQColor & TQt::darkYellow = stdcol[18];
+const TQColor & TQt::color0 = stdcol[0];
+const TQColor & TQt::color1 = stdcol[1];
+const TQColor & TQt::black = stdcol[2];
+const TQColor & TQt::white = stdcol[3];
+const TQColor & TQt::darkGray = stdcol[4];
+const TQColor & TQt::gray = stdcol[5];
+const TQColor & TQt::lightGray = stdcol[6];
+const TQColor & TQt::red = stdcol[7];
+const TQColor & TQt::green = stdcol[8];
+const TQColor & TQt::blue = stdcol[9];
+const TQColor & TQt::cyan = stdcol[10];
+const TQColor & TQt::magenta = stdcol[11];
+const TQColor & TQt::yellow = stdcol[12];
+const TQColor & TQt::darkRed = stdcol[13];
+const TQColor & TQt::darkGreen = stdcol[14];
+const TQColor & TQt::darkBlue = stdcol[15];
+const TQColor & TQt::darkCyan = stdcol[16];
+const TQColor & TQt::darkMagenta = stdcol[17];
+const TQColor & TQt::darkYellow = stdcol[18];
/*****************************************************************************
diff --git a/src/kernel/qcursor_x11.cpp b/src/kernel/qcursor_x11.cpp
index 9fd666397..f3b034da8 100644
--- a/src/kernel/qcursor_x11.cpp
+++ b/src/kernel/qcursor_x11.cpp
@@ -105,23 +105,23 @@ static TQCursor cursorTable[TQt::LastCursor+1];
static const int arrowCursorIdx = 0;
-QT_STATIC_CONST_IMPL TQCursor & TQt::arrowCursor = cursorTable[0];
-QT_STATIC_CONST_IMPL TQCursor & TQt::upArrowCursor = cursorTable[1];
-QT_STATIC_CONST_IMPL TQCursor & TQt::crossCursor = cursorTable[2];
-QT_STATIC_CONST_IMPL TQCursor & TQt::waitCursor = cursorTable[3];
-QT_STATIC_CONST_IMPL TQCursor & TQt::ibeamCursor = cursorTable[4];
-QT_STATIC_CONST_IMPL TQCursor & TQt::sizeVerCursor = cursorTable[5];
-QT_STATIC_CONST_IMPL TQCursor & TQt::sizeHorCursor = cursorTable[6];
-QT_STATIC_CONST_IMPL TQCursor & TQt::sizeBDiagCursor = cursorTable[7];
-QT_STATIC_CONST_IMPL TQCursor & TQt::sizeFDiagCursor = cursorTable[8];
-QT_STATIC_CONST_IMPL TQCursor & TQt::sizeAllCursor = cursorTable[9];
-QT_STATIC_CONST_IMPL TQCursor & TQt::blankCursor = cursorTable[10];
-QT_STATIC_CONST_IMPL TQCursor & TQt::splitVCursor = cursorTable[11];
-QT_STATIC_CONST_IMPL TQCursor & TQt::splitHCursor = cursorTable[12];
-QT_STATIC_CONST_IMPL TQCursor & TQt::pointingHandCursor = cursorTable[13];
-QT_STATIC_CONST_IMPL TQCursor & TQt::forbiddenCursor = cursorTable[14];
-QT_STATIC_CONST_IMPL TQCursor & TQt::whatsThisCursor = cursorTable[15];
-QT_STATIC_CONST_IMPL TQCursor & TQt::busyCursor = cursorTable[16];
+const TQCursor & TQt::arrowCursor = cursorTable[0];
+const TQCursor & TQt::upArrowCursor = cursorTable[1];
+const TQCursor & TQt::crossCursor = cursorTable[2];
+const TQCursor & TQt::waitCursor = cursorTable[3];
+const TQCursor & TQt::ibeamCursor = cursorTable[4];
+const TQCursor & TQt::sizeVerCursor = cursorTable[5];
+const TQCursor & TQt::sizeHorCursor = cursorTable[6];
+const TQCursor & TQt::sizeBDiagCursor = cursorTable[7];
+const TQCursor & TQt::sizeFDiagCursor = cursorTable[8];
+const TQCursor & TQt::sizeAllCursor = cursorTable[9];
+const TQCursor & TQt::blankCursor = cursorTable[10];
+const TQCursor & TQt::splitVCursor = cursorTable[11];
+const TQCursor & TQt::splitHCursor = cursorTable[12];
+const TQCursor & TQt::pointingHandCursor = cursorTable[13];
+const TQCursor & TQt::forbiddenCursor = cursorTable[14];
+const TQCursor & TQt::whatsThisCursor = cursorTable[15];
+const TQCursor & TQt::busyCursor = cursorTable[16];
TQCursor *TQCursor::find_cur( int shape ) // find predefined cursor
diff --git a/src/sql/ntqsqldatabase.h b/src/sql/ntqsqldatabase.h
index a6d744877..1fed63e04 100644
--- a/src/sql/ntqsqldatabase.h
+++ b/src/sql/ntqsqldatabase.h
@@ -129,7 +129,7 @@ public:
TQSqlDriver* driver() const;
// MOC_SKIP_BEGIN
- QT_STATIC_CONST char * const defaultConnection;
+ static const char * const defaultConnection;
// MOC_SKIP_END
static TQSqlDatabase* addDatabase( const TQString& type, const TQString& connectionName = defaultConnection );
diff --git a/src/sql/qsqldatabase.cpp b/src/sql/qsqldatabase.cpp
index 8c42452d2..66c1725aa 100644
--- a/src/sql/qsqldatabase.cpp
+++ b/src/sql/qsqldatabase.cpp
@@ -87,7 +87,7 @@
#include "ntqdict.h"
#include <stdlib.h>
-QT_STATIC_CONST_IMPL char * const TQSqlDatabase::defaultConnection = "qt_sql_default_connection";
+const char * const TQSqlDatabase::defaultConnection = "qt_sql_default_connection";
TQPtrDict<TQSqlDriverExtension> *qt_driver_extension_dict = 0;
TQPtrDict<TQSqlOpenExtension> *qt_open_extension_dict = 0;
diff --git a/src/tools/ntqglobal.h b/src/tools/ntqglobal.h
index edd27d431..1eb559919 100644
--- a/src/tools/ntqglobal.h
+++ b/src/tools/ntqglobal.h
@@ -681,19 +681,6 @@ const bool true = TRUE;
//
-// Workaround for static const members on MSVC++.
-//
-
-#if defined(Q_CC_MSVC)
-# define QT_STATIC_CONST static
-# define QT_STATIC_CONST_IMPL
-#else
-# define QT_STATIC_CONST static const
-# define QT_STATIC_CONST_IMPL const
-#endif
-
-
-//
// Utility macros and inline functions
//
diff --git a/src/tools/ntqstring.h b/src/tools/ntqstring.h
index e98aba40a..c2ef2a5eb 100644
--- a/src/tools/ntqstring.h
+++ b/src/tools/ntqstring.h
@@ -90,11 +90,11 @@ public:
TQChar( uint rc );
TQChar( int rc );
- QT_STATIC_CONST TQChar null; // 0000
- QT_STATIC_CONST TQChar replacement; // FFFD
- QT_STATIC_CONST TQChar byteOrderMark; // FEFF
- QT_STATIC_CONST TQChar byteOrderSwapped; // FFFE
- QT_STATIC_CONST TQChar nbsp; // 00A0
+ static const TQChar null; // 0000
+ static const TQChar replacement; // FFFD
+ static const TQChar byteOrderMark; // FEFF
+ static const TQChar byteOrderSwapped; // FFFE
+ static const TQChar nbsp; // 00A0
// Unicode information
@@ -423,7 +423,7 @@ public:
TQString &operator=( TQChar c );
TQString &operator=( char c );
- QT_STATIC_CONST TQString null;
+ static const TQString null;
bool isNull() const;
bool isEmpty() const;
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 938ff3130..26e9b61cd 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -1457,12 +1457,12 @@ char* TQString::unicodeToLatin1(const TQChar *uc, uint l, bool unpaged)
*/
TQ_EXPORT TQStringData *TQString::shared_null = 0;
-QT_STATIC_CONST_IMPL TQString TQString::null;
-QT_STATIC_CONST_IMPL TQChar TQChar::null;
-QT_STATIC_CONST_IMPL TQChar TQChar::replacement((ushort)0xfffd);
-QT_STATIC_CONST_IMPL TQChar TQChar::byteOrderMark((ushort)0xfeff);
-QT_STATIC_CONST_IMPL TQChar TQChar::byteOrderSwapped((ushort)0xfffe);
-QT_STATIC_CONST_IMPL TQChar TQChar::nbsp((ushort)0x00a0);
+const TQString TQString::null;
+const TQChar TQChar::null;
+const TQChar TQChar::replacement((ushort)0xfffd);
+const TQChar TQChar::byteOrderMark((ushort)0xfeff);
+const TQChar TQChar::byteOrderSwapped((ushort)0xfffe);
+const TQChar TQChar::nbsp((ushort)0x00a0);
TQStringData* TQString::makeSharedNull()
{