42 #include "qplatformdefs.h" 52 #include <private/qthread_p.h> 61 #ifndef QT_NO_EXCEPTIONS 66 #if !defined(Q_OS_WINCE) 68 # if defined(Q_CC_MSVC) 73 #if defined(Q_OS_VXWORKS) && defined(_WRS_KERNEL) 77 #if defined(Q_OS_MACX) && !defined(Q_OS_IOS) 78 #include <CoreServices/CoreServices.h> 86 #if defined(Q_OS_SYMBIAN) 91 # include "private/qcore_symbian_p.h" 93 _LIT(qt_S60Filter,
"Series60v?.*.sis");
94 _LIT(qt_symbianSystemInstallDir,
"z:\\system\\install\\");
2064 #if defined(QT_BUILD_QMAKE) 2066 static const unsigned int qt_one = 1;
2067 const int QSysInfo::ByteOrder = ((*((
unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
2070 #if !defined(QWS) && defined(Q_OS_MAC) 2073 #include "private/qcore_mac_p.h" 2079 #if !defined(Q_OS_IOS) 2080 SInt32 gestalt_version;
2081 if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
2089 #elif defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINCE) 2095 static inline OSVERSIONINFO winOsVersion()
2097 OSVERSIONINFO result = {
sizeof(OSVERSIONINFO), 0, 0, 0, 0, {
'\0'}};
2100 # if defined(_MSC_VER) && _MSC_VER >= 1800 2101 # pragma warning( push ) 2102 # pragma warning( disable : 4996 ) 2104 GetVersionEx(&result);
2105 # if defined(_MSC_VER) && _MSC_VER >= 1800 2106 # pragma warning( pop ) 2109 if (result.dwMajorVersion == 6 && result.dwMinorVersion == 2) {
2112 DWORDLONG conditionMask = 0;
2113 VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
2114 VER_SET_CONDITION(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
2115 VER_SET_CONDITION(conditionMask, VER_PLATFORMID, VER_EQUAL);
2116 OSVERSIONINFOEX checkVersion = {
sizeof(OSVERSIONINFOEX), result.dwMajorVersion, result.dwMinorVersion,
2117 result.dwBuildNumber, result.dwPlatformId, {
'\0'}, 0, 0, 0, 0, 0 };
2118 for ( ; VerifyVersionInfo(&checkVersion, VER_MAJORVERSION | VER_MINORVERSION | VER_PLATFORMID, conditionMask); ++checkVersion.dwMinorVersion)
2119 result.dwMinorVersion = checkVersion.dwMinorVersion;
2121 # endif // !Q_OS_WINCE 2127 #ifndef VER_PLATFORM_WIN32s 2128 #define VER_PLATFORM_WIN32s 0 2130 #ifndef VER_PLATFORM_WIN32_WINDOWS 2131 #define VER_PLATFORM_WIN32_WINDOWS 1 2133 #ifndef VER_PLATFORM_WIN32_NT 2134 #define VER_PLATFORM_WIN32_NT 2 2136 #ifndef VER_PLATFORM_WIN32_CE 2137 #define VER_PLATFORM_WIN32_CE 3 2144 const OSVERSIONINFO osver = winOsVersion();
2147 qt_cever = osver.dwMajorVersion * 100;
2148 qt_cever += osver.dwMinorVersion * 10;
2150 switch (osver.dwPlatformId) {
2151 case VER_PLATFORM_WIN32s:
2154 case VER_PLATFORM_WIN32_WINDOWS:
2156 if (osver.dwMinorVersion == 90)
2158 else if (osver.dwMinorVersion == 10)
2164 case VER_PLATFORM_WIN32_CE:
2165 if (qt_cever >= 600)
2167 if (qt_cever >= 500)
2169 else if (qt_cever >= 400)
2176 if (osver.dwMajorVersion < 5) {
2178 }
else if (osver.dwMajorVersion == 5 && osver.dwMinorVersion == 0) {
2180 }
else if (osver.dwMajorVersion == 5 && osver.dwMinorVersion == 1) {
2182 }
else if (osver.dwMajorVersion == 5 && osver.dwMinorVersion == 2) {
2184 }
else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 0) {
2186 }
else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 1) {
2188 }
else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 2) {
2190 }
else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 3) {
2193 qWarning(
"Qt: Untested Windows version %d.%d detected!",
2194 int(osver.dwMajorVersion),
int(osver.dwMinorVersion));
2205 if (
override ==
"Me")
2207 if (
override ==
"95")
2209 else if (
override ==
"98")
2211 else if (
override ==
"NT")
2213 else if (
override ==
"2000")
2215 else if (
override ==
"2003")
2217 else if (
override ==
"XP")
2219 else if (
override ==
"VISTA")
2221 else if (
override ==
"WINDOWS7")
2223 else if (
override ==
"WINDOWS8")
2236 static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
2237 static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
2239 static void symbianInitVersions()
2244 RFs rfs = qt_s60GetRFs();
2245 TFindFile fileFinder(rfs);
2249 TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
2250 if (err == KErrNone) {
2252 err = contents->Sort(EDescending|ESortByName);
2253 if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) {
2254 TInt major = (*contents)[0].iName[9] -
'0';
2255 TInt minor = (*contents)[0].iName[11] -
'0';
2258 cachedS60Version = QSysInfo::SV_S60_3_1;
2259 cachedSymbianVersion = QSysInfo::SV_9_2;
2260 }
else if (minor == 2) {
2261 cachedS60Version = QSysInfo::SV_S60_3_2;
2262 cachedSymbianVersion = QSysInfo::SV_9_3;
2264 }
else if (major == 5) {
2266 cachedS60Version = QSysInfo::SV_S60_5_0;
2267 cachedSymbianVersion = QSysInfo::SV_9_4;
2268 }
else if (minor == 1) {
2269 cachedS60Version = QSysInfo::SV_S60_5_1;
2270 cachedSymbianVersion = QSysInfo::SV_SF_2;
2271 }
else if (minor == 2) {
2272 cachedS60Version = QSysInfo::SV_S60_5_2;
2273 cachedSymbianVersion = QSysInfo::SV_SF_3;
2274 }
else if (minor == 3) {
2275 cachedS60Version = QSysInfo::SV_S60_5_3;
2276 cachedSymbianVersion = QSysInfo::SV_API_5_3;
2277 }
else if (minor == 4) {
2278 cachedS60Version = QSysInfo::SV_S60_5_4;
2279 cachedSymbianVersion = QSysInfo::SV_API_5_4;
2280 }
else if (minor >= 5) {
2281 cachedS60Version = QSysInfo::SV_S60_5_5;
2282 cachedSymbianVersion = QSysInfo::SV_API_5_5;
2288 # ifdef Q_CC_NOKIAX86 2289 if (cachedS60Version == -1) {
2294 # if defined(__SERIES60_31__) 2295 cachedS60Version = QSysInfo::SV_S60_3_1;
2296 cachedSymbianVersion = QSysInfo::SV_9_2;
2297 # elif defined(__S60_32__) 2298 cachedS60Version = QSysInfo::SV_S60_3_2;
2299 cachedSymbianVersion = QSysInfo::SV_9_3;
2300 # elif defined(__S60_50__) 2301 cachedS60Version = QSysInfo::SV_S60_5_0;
2302 cachedSymbianVersion = QSysInfo::SV_9_4;
2303 # elif defined(S60_VERSION_5_2) 2304 cachedS60Version = QSysInfo::SV_S60_5_2;
2305 cachedSymbianVersion = QSysInfo::SV_SF_3;
2306 # elif defined(S60_VERSION_5_3) 2307 cachedS60Version = QSysInfo::SV_S60_5_3;
2308 cachedSymbianVersion = QSysInfo::SV_API_5_3;
2309 # elif defined(S60_VERSION_5_4) 2310 cachedS60Version = QSysInfo::SV_S60_5_4;
2311 cachedSymbianVersion = QSysInfo::SV_API_5_4;
2312 # elif defined(S60_VERSION_5_5) 2313 cachedS60Version = QSysInfo::SV_S60_5_5;
2314 cachedSymbianVersion = QSysInfo::SV_API_5_5;
2319 if (cachedS60Version == -1) {
2321 cachedS60Version = QSysInfo::SV_S60_Unknown;
2322 cachedSymbianVersion = QSysInfo::SV_Unknown;
2326 QSysInfo::SymbianVersion QSysInfo::symbianVersion()
2328 if (cachedSymbianVersion == -1)
2329 symbianInitVersions();
2331 return cachedSymbianVersion;
2334 QSysInfo::S60Version QSysInfo::s60Version()
2336 if (cachedS60Version == -1)
2337 symbianInitVersions();
2339 return cachedS60Version;
2341 #endif // ifdef Q_OS_SYMBIAN 2444 qFatal(
"In file %s, line %d: Out of memory", n, l);
2459 void qt_assert(
const char *assertion,
const char *file,
int line)
2461 qFatal(
"ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
2467 void qt_assert_x(
const char *where,
const char *what,
const char *file,
int line)
2469 qFatal(
"ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
2481 if (n >= (UINT_MAX>>2)) {
2483 unsigned int r2 = r + 1;
2484 return (n >= r2 * r2) ? r2 : r;
2486 uint h, p= 0, q= 1, r= n;
2501 #if defined(qMemCopy) 2504 #if defined(qMemSet) 2508 void *
qMemCopy(
void *dest,
const void *src,
size_t n) {
return memcpy(dest, src, n); }
2509 void *
qMemSet(
void *dest,
int c,
size_t n) {
return memset(dest, c, n); }
2513 #if defined(Q_CC_MWERKS) && defined(Q_OS_MACX) 2515 static void mac_default_handler(
const char *msg)
2522 fprintf(stderr, msg);
2525 #endif // Q_CC_MWERKS && Q_OS_MACX 2527 #if defined(QT_USE_SLOG2) 2529 #define QT_LOG_CODE 9000 2532 extern char *__progname;
2534 static void slog2_default_handler(
QtMsgType msgType,
const char *message)
2536 if (slog2_set_default_buffer((slog2_buffer_t)-1) == 0) {
2537 slog2_buffer_set_config_t buffer_config;
2538 slog2_buffer_t buffer_handle;
2540 buffer_config.buffer_set_name = __progname;
2541 buffer_config.num_buffers = 1;
2542 buffer_config.verbosity_level = SLOG2_INFO;
2543 buffer_config.buffer_config[0].buffer_name =
"default";
2544 buffer_config.buffer_config[0].num_pages = 8;
2546 if (slog2_register(&buffer_config, &buffer_handle, 0) == -1) {
2547 fprintf(stderr,
"Error registering slogger2 buffer!\n");
2548 fprintf(stderr,
"%s", message);
2554 slog2_set_default_buffer(buffer_handle);
2560 severity = SLOG2_INFO;
2563 severity = SLOG2_NOTICE;
2566 severity = SLOG2_WARNING;
2569 severity = SLOG2_ERROR;
2573 slog2c(NULL, QT_LOG_CODE, severity, message);
2575 #endif // QT_USE_SLOG2 2577 #if !defined(Q_OS_WIN) && !defined(QT_NO_THREAD) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) && \ 2578 defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L 2604 if (errorCode == -1) {
2605 #if defined(Q_OS_WIN) 2606 errorCode = GetLastError();
2611 switch (errorCode) {
2628 wchar_t *
string = 0;
2629 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
2632 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
2637 LocalFree((HLOCAL)
string);
2639 if (ret.
isEmpty() && errorCode == ERROR_MOD_NOT_FOUND)
2641 #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) 2643 ret = fromstrerror_helper(strerror_r(errorCode, buf.
data(), buf.
size()), buf);
2693 #if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) 2702 #if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) 2715 (*handler)(msgType, buf);
2717 #if defined(Q_CC_MWERKS) && defined(Q_OS_MACX) 2718 mac_default_handler(buf);
2719 #elif defined(QT_USE_SLOG2) 2720 slog2_default_handler(msgType, buf);
2721 #elif defined(Q_OS_WINCE) 2724 OutputDebugString(reinterpret_cast<const wchar_t *> (fstr.
utf16()));
2725 #elif defined(Q_OS_SYMBIAN) 2727 char format[] =
"[Qt Message] %S";
2728 const int maxBlockSize = 256 -
sizeof(
format);
2729 const TPtrC8
ptr(reinterpret_cast<const TUint8*>(buf));
2730 for (
int i = 0; i < ptr.Length(); i += maxBlockSize) {
2731 TPtrC8 part(ptr.Mid(i,
qMin(maxBlockSize, ptr.Length()-i)));
2732 RDebug::Printf(format, &part);
2735 fprintf(stderr,
"%s\n", buf);
2744 #if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) 2746 int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
2747 _CrtSetReportMode(_CRT_ERROR, reportMode);
2748 #if !defined(Q_OS_WINCE) 2749 int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__,
QT_VERSION_STR, buf);
2751 int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__),
2754 if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW)
2760 #if defined(Q_OS_SYMBIAN) 2763 TPtrC8
ptr(reinterpret_cast<const TUint8*>(buf));
2764 TInt len = Min(tmp.MaxLength(), ptr.Length());
2765 tmp.Copy(ptr.Left(len));
2767 User::Panic(tmp, 0);
2768 #elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW)) 2776 #if !defined(QT_NO_EXCEPTIONS) 2787 char emergency_buf[256] = {
'\0' };
2788 emergency_buf[255] =
'\0';
2800 #if !defined(QT_NO_EXCEPTIONS) 2801 if (std::uncaught_exception()) {
2810 }
QT_CATCH(
const std::bad_alloc &) {
2811 #if !defined(QT_NO_EXCEPTIONS) 2859 void qDebug(
const char *msg, ...)
2902 void qWarning(
const char *msg, ...)
2950 void qSystemWarning(
const char *msg,
int code)
2952 #endif // QT3_SUPPORT 3009 void qFatal(
const char *msg, ...)
3037 #if defined(_MSC_VER) && _MSC_VER >= 1400 3038 size_t requiredSize = 0;
3040 getenv_s(&requiredSize, 0, 0, varName);
3041 if (requiredSize == 0)
3043 buffer.
resize(
int(requiredSize));
3044 getenv_s(&requiredSize, buffer.
data(), requiredSize, varName);
3073 #if defined(_MSC_VER) && _MSC_VER >= 1400 3079 char* envVar =
qstrdup(buffer.constData());
3080 int result = putenv(envVar);
3087 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD) 3089 # if defined(Q_OS_INTEGRITY) && defined(__GHS_VERSION_NUMBER) && (__GHS_VERSION_NUMBER < 500) 3121 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD) 3163 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD) 3171 return rand_r(pseed);
3578 #if defined(QT3_SUPPORT) && !defined(QT_NO_SETTINGS) 3589 const char *qInstallPath()
3593 const char *qInstallPathDocs()
3597 const char *qInstallPathHeaders()
3601 const char *qInstallPathLibs()
3605 const char *qInstallPathBins()
3609 const char *qInstallPathPlugins()
3613 const char *qInstallPathData()
3617 const char *qInstallPathTranslations()
3621 const char *qInstallPathSysconf()
3648 return (
bool) cbt->
callbacks[cb].removeAll(callback);
3655 Q_ASSERT_X(cb >= 0,
"QInternal::activateCallback()",
"Callback id must be a valid id");
3658 if (cbt && cb < cbt->callbacks.size()) {
3661 for (
int i=0; i<callbacks.
size(); ++i)
3662 ret |= (callbacks.
at(i))(parameters);
3673 "QInternal::callFunction()",
"Callback id must be a valid id");
3674 #ifndef QT_NO_QOBJECT 3676 #ifndef QT_NO_THREAD 3694 sender->
signal = *(
int *) args[2];
4060 #if defined(Q_OS_SYMBIAN) 4155 #include <stdexcept> 4157 class QSymbianLeaveException :
public std::exception
4160 inline QSymbianLeaveException(
int err) :
error(err) {}
4161 inline const char* what()
const throw() {
return "Symbian leave exception"; }
4180 void qt_symbian_throwIfError(
int error)
4182 if (error >= KErrNone)
4186 throw std::bad_alloc();
4188 throw std::invalid_argument(
"from Symbian error");
4190 throw std::overflow_error(
"from Symbian error");
4192 throw std::underflow_error(
"from Symbian error");
4194 throw QSymbianLeaveException(error);
4210 void qt_symbian_exception2LeaveL(
const std::exception& aThrow)
4212 User::Leave(qt_symbian_exception2Error(aThrow));
4227 int qt_symbian_exception2Error(
const std::exception& aThrow)
4229 const std::type_info& atype =
typeid(aThrow);
4230 int err = KErrGeneral;
4232 if(atype ==
typeid (std::bad_alloc))
4234 else if(atype ==
typeid(QSymbianLeaveException))
4235 err = static_cast<const QSymbianLeaveException&>(aThrow).error;
4237 if(atype ==
typeid(std::invalid_argument))
4239 else if(atype ==
typeid(std::out_of_range))
4245 else if(atype ==
typeid(std::overflow_error))
4247 else if(atype ==
typeid(std::underflow_error))
4248 err = KErrUnderflow;
4249 qWarning(
"translation from std exception \"%s\" to %d", aThrow.what(), err);
static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
QString qt_error_string(int errorCode)
void chop(int n)
Removes n bytes from the end of the byte array.
static Sender * setCurrentSender(QObject *receiver, Sender *sender)
static void callback(AuServer *, AuEventHandlerRec *, AuEvent *e, AuPointer p)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
static void qt_message(QtMsgType msgType, const char *msg, va_list ap)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
char * data()
Returns a pointer to the data stored in the byte array.
static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap)
Uses a local buffer to output the message.
The QByteArray class provides an array of bytes.
#define getenv_s(a, b, c, d)
static WinVersion windowsVersion()
Returns the version of the Windows operating system on which the application is run (Windows only)...
#define QT_TRANSLATE_NOOP(scope, x)
Marks the string literal sourceText for dynamic translation in the given context; i...
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
void(* QtMsgHandler)(QtMsgType, const char *)
static bool callFunction(InternalFunction func, void **)
static const WinVersion WindowsVersion
the version of the Windows operating system on which the application is run (Windows only) ...
The QString class provides a Unicode character string.
static QSysInfo::MacVersion macVersion()
Use QSysInfo::MacintoshVersion instead.
Q_CORE_EXPORT int qrand()
QString & vsprintf(const char *format, va_list ap)
Equivalent method to sprintf(), but takes a va_list ap instead a list of variable arguments...
static QtMsgHandler handler
The QVector class is a template class that provides a dynamic array.
The QObject class is the base class of all Qt objects.
QtMsgType
This enum describes the messages that can be sent to a message handler (QtMsgHandler).
static bool unregisterCallback(Callback, qInternalCallback)
static QObjectPrivate * get(QObject *o)
void resize(int size)
Sets the size of the vector to size.
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
Q_CORE_EXPORT const char * qVersion()
Q_CORE_EXPORT void qDebug(const char *,...)
static QThreadData * get2(QThread *thread)
#define QT_BEGIN_NAMESPACE
This macro expands to.
LibraryLocation
This enum type is used to specify a specific location specifier:
static bool isEmpty(const char *str)
void qWinMsgHandler(QtMsgType t, const char *str)
static bool activateCallbacks(Callback, void **)
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
void qt_assert(const char *assertion, const char *file, int line)
T & localData()
Returns a reference to the data that was set by the calling thread.
const T & at(int i) const
Returns the item at index position i in the list.
void append(const T &t)
Inserts value at the end of the vector.
QVector< QList< qInternalCallback > > callbacks
Q_CORE_EXPORT void qWarning(const char *,...)
#define QT_VERSION_STR
This macro expands to a string that specifies Qt's version number (for example, "4.
static void resetCurrentSender(QObject *receiver, Sender *currentSender, Sender *previousSender)
const T * ptr(const T &t)
Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
void qt_check_pointer(const char *n, int l)
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
void * qMemCopy(void *dest, const void *src, size_t n)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Q_CORE_EXPORT unsigned int qt_int_sqrt(unsigned int n)
void qt_message_output(QtMsgType msgType, const char *buf)
Q_CORE_EXPORT void qFatal(const char *,...)
#define Q_ASSERT_X(cond, where, what)
void * qMemSet(void *dest, int c, size_t n)
MacVersion
This enum provides symbolic names for the various versions of the OS X operating system.
QtMsgHandler qInstallMsgHandler(QtMsgHandler h)
Q_CORE_EXPORT char * qstrdup(const char *)
void qt_set_current_thread_to_main_thread()
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void setLocalData(T t)
Sets the local data for the calling thread to data.
static QString location(LibraryLocation)
Returns the location specified by loc.
QThreadStorage< SeedStorageType * > SeedStorage
void resize(int size)
Sets the size of the byte array to size bytes.
int size() const
Returns the number of items in the list.
bool(* qInternalCallback)(void **)
int size() const
Returns the number of bytes in this byte array.
Q_CORE_EXPORT bool qputenv(const char *varName, const QByteArray &value)
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
static QThread * createThreadForAdoption()
static const MacVersion MacintoshVersion
the version of the Macintosh operating system on which the application is run (Mac only)...
WinVersion
This enum provides symbolic names for the various versions of the Windows operating system...
Q_CORE_EXPORT void qsrand(uint seed)
void qt_mac_to_pascal_string(const QString &s, Str255 str, TextEncoding encoding, int len)
The QThread class provides a platform-independent way to manage threads.
The QThreadStorage class provides per-thread data storage.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static bool isNull(const QVariant::Private *d)
Q_CORE_EXPORT void qCritical(const char *,...)
bool endsWith(const QByteArray &a) const
Returns true if this byte array ends with byte array ba; otherwise returns false. ...
The QList class is a template class that provides lists.
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.
void qErrnoWarning(const char *msg,...)
void qt_assert_x(const char *where, const char *what, const char *file, int line)