remove redundant Q_OS_UNIX and Q_C_CALLBACKS definitions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-03-15 09:20:39 +02:00
parent 24deb82098
commit bb389094cc
7 changed files with 0 additions and 47 deletions

View file

@ -863,13 +863,6 @@ const char *qVersion()
Defined on Sun Solaris.
*/
/*!
\macro Q_OS_UNIX
\relates <QtGlobal>
Defined on Any UNIX BSD/SYSV system.
*/
/*!
\macro Q_CC_GNU
\relates <QtGlobal>

View file

@ -32,7 +32,6 @@
// Compatibility, used to be conditional
#define Q_WS_X11
#define Q_OS_UNIX
#include <utility> // std::swap
#include <cstdint> // std::uintptr_t
@ -94,7 +93,6 @@ QT_USE_NAMESPACE
# error "Katie has not been tested with this compiler"
#endif
#define Q_C_CALLBACKS
#define Q_ALIGNOF(type) __alignof__(type)
#define Q_TYPEOF(expr) __typeof__(expr)
#define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))

View file

@ -46,9 +46,7 @@ QT_BEGIN_NAMESPACE
Never to grayscale.
*/
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static void qt_png_warning(png_structp /*png_ptr*/, png_const_charp message)
{
@ -79,9 +77,7 @@ static void qt_png_flush(png_structp /* png_ptr */)
{
}
#if defined(Q_C_CALLBACKS)
}
#endif
QPngHandler::QPngHandler()
: m_compression(1)

View file

@ -259,9 +259,7 @@ struct qt_xfixes_selection_event_data
Atom selection;
};
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static Bool qt_xfixes_scanner(Display*, XEvent *event, XPointer arg)
{
@ -274,9 +272,7 @@ static Bool qt_xfixes_scanner(Display*, XEvent *event, XPointer arg)
return false;
}
#if defined(Q_C_CALLBACKS)
}
#endif
#endif // QT_NO_XFIXES
@ -351,9 +347,7 @@ QAbstractEventDispatcher* QApplicationPrivate::createEventDispatcher()
Default X error handlers
*****************************************************************************/
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static int (*original_x_errhandler)(Display *dpy, XErrorEvent *);
static int (*original_xio_errhandler)(Display *dpy);
@ -472,9 +466,7 @@ static int qt_xio_errhandler(Display *)
return 0;
}
#if defined(Q_C_CALLBACKS)
}
#endif
#ifndef QT_NO_XSYNC
@ -483,9 +475,7 @@ struct qt_sync_request_event_data
WId window;
};
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static Bool qt_sync_request_scanner(Display*, XEvent *event, XPointer arg)
{
@ -510,9 +500,7 @@ static Bool qt_sync_request_scanner(Display*, XEvent *event, XPointer arg)
return false;
}
#if defined(Q_C_CALLBACKS)
}
#endif
#endif // QT_NO_XSYNC
@ -2923,9 +2911,7 @@ struct PaintEventInfo {
Window window;
};
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static Bool isPaintOrScrollDoneEvent(Display *, XEvent *ev, XPointer a)
{
@ -2939,9 +2925,7 @@ static Bool isPaintOrScrollDoneEvent(Display *, XEvent *ev, XPointer a)
return False;
}
#if defined(Q_C_CALLBACKS)
}
#endif

View file

@ -329,9 +329,7 @@ struct qt_init_timestamp_data
Time timestamp;
};
#if defined(Q_C_CALLBACKS)
extern "C" {
#endif
static Bool qt_init_timestamp_scanner(Display*, XEvent *event, XPointer arg)
{
@ -373,9 +371,7 @@ static Bool qt_init_timestamp_scanner(Display*, XEvent *event, XPointer arg)
return false;
}
#if defined(Q_C_CALLBACKS)
}
#endif
QClipboard::QClipboard(QObject *parent)
: QObject(parent)

View file

@ -912,8 +912,6 @@ Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
return result;
}
#if defined(Q_OS_UNIX)
//#define QT_REGION_DEBUG
/*
* clip region
@ -4162,6 +4160,4 @@ void *QRegion::clipRectangles(int &num) const
return d->xrectangles;
}
#endif // Q_OS_UNIX
QT_END_NAMESPACE

View file

@ -754,9 +754,7 @@ namespace QTest
static int keyVerbose = -1;
static unsigned int seed = 0;
static bool seedSet = false;
#if defined(Q_OS_UNIX)
static bool noCrashHandler = false;
#endif
void filter_unprintable(char *str)
{
@ -990,9 +988,7 @@ Q_TEST_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
" -keyevent-verbose : Turn on verbose messages for keyboard simulation\n"
" -maxwarnings n : Sets the maximum amount of messages to output.\n"
" 0 means unlimited, default: 2000\n"
#if defined(Q_OS_UNIX)
" -nocrashhandler : Disables the crash handler\n"
#endif
"\n"
" Benchmark related options:\n"
" -tickcounter : Use CPU tick counters to time benchmarks\n"
@ -1071,10 +1067,8 @@ Q_TEST_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
} else {
QTestLog::setMaxWarnings(qToInt(argv[++i]));
}
#if defined(Q_OS_UNIX)
} else if (strcmp(argv[i], "-nocrashhandler") == 0) {
QTest::noCrashHandler = true;
#endif
} else if (strcmp(argv[i], "-keyevent-verbose") == 0) {
QTest::keyVerbose = 1;
} else if (strcmp(argv[i], "-tickcounter") == 0) {
@ -1539,7 +1533,6 @@ static void qInvokeTestMethods(QObject *testObject)
QTestLog::stopLogging();
}
#if defined(Q_OS_UNIX)
class FatalSignalHandler
{
public:
@ -1612,7 +1605,6 @@ FatalSignalHandler::~FatalSignalHandler()
sigaction(i, &oldact, 0);
}
}
#endif // Q_OS_UNIX
} // namespace
@ -1674,11 +1666,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
seedRandom();
}
{
#if defined(Q_OS_UNIX)
QScopedPointer<FatalSignalHandler> handler;
if (!noCrashHandler)
handler.reset(new FatalSignalHandler());
#endif
qInvokeTestMethods(testObject);
}