Skip to content

Commit

Permalink
internal macros ( not intended for application code ) moved from
Browse files Browse the repository at this point in the history
QskGlobal.h to QskInternalMacros.h
  • Loading branch information
uwerat committed Jan 3, 2025
1 parent 06b0783 commit 33a4825
Show file tree
Hide file tree
Showing 47 changed files with 85 additions and 21 deletions.
1 change: 1 addition & 0 deletions playground/gradients/GradientQuickShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <QskGradient.h>
#include <QskGradientDirection.h>
#include <QskBoxRenderer.h>
#include <QskInternalMacros.h>

QSK_QT_PRIVATE_BEGIN

Expand Down
1 change: 1 addition & 0 deletions playground/images/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "Image.h"
#include <QskInternalMacros.h>

QSK_QT_PRIVATE_BEGIN
#include <private/qquickimage_p_p.h>
Expand Down
3 changes: 2 additions & 1 deletion playground/images/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

#pragma once

#include "QskGlobal.h"
#include <QskGlobal.h>
#include <QskInternalMacros.h>

QSK_QT_PRIVATE_BEGIN

Expand Down
1 change: 1 addition & 0 deletions playground/shadows/ArcShadowNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "ArcShadowNode.h"
#include <QskInternalMacros.h>

#include <qcolor.h>
#include <qsgmaterial.h>
Expand Down
6 changes: 5 additions & 1 deletion qmlexport/QskQml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@
#include <QskWindow.h>

#if QT_VERSION < QT_VERSION_CHECK( 6, 2, 0 )

#include <QskInternalMacros.h>

QSK_QT_PRIVATE_BEGIN
#include <private/qqmlmetatype_p.h>
#include <private/qqmlmetatype_p.h>
QSK_QT_PRIVATE_END

#endif

#if QT_VERSION < QT_VERSION_CHECK( 6, 5, 0 )
Expand Down
2 changes: 2 additions & 0 deletions qmlexport/QskShortcutQml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <qquickitem.h>
#include <qquickwindow.h>

#include <QskInternalMacros.h>

QSK_QT_PRIVATE_BEGIN
#include <QtGui/private/qguiapplication_p.h>
QSK_QT_PRIVATE_END
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ list(APPEND SOURCES
common/QskTickmarks.cpp
)

list(APPEND PRIVATE_HEADERS
common/QskInternalMacros.h
)

list(APPEND HEADERS
graphic/QskColorFilter.h
graphic/QskGraphic.h
Expand Down
1 change: 1 addition & 0 deletions src/common/QskFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskFunctions.h"
#include "QskInternalMacros.h"

#include <qfont.h>
#include <qfontmetrics.h>
Expand Down
19 changes: 0 additions & 19 deletions src/common/QskGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef QSK_GLOBAL_H
#define QSK_GLOBAL_H

#include <qcompilerdetection.h>
#include <qglobal.h>

#if QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 )
Expand All @@ -32,24 +31,6 @@
#define QSK_EXPORT
#endif

#define QSK_QT_PRIVATE_BEGIN \
QT_WARNING_PUSH \
QT_WARNING_DISABLE_GCC("-Wpragmas") \
QT_WARNING_DISABLE_GCC("-Wpedantic") \
QT_WARNING_DISABLE_GCC("-Wsuggest-override") \
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types") \
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")

#define QSK_QT_PRIVATE_END \
QT_WARNING_POP

#define QSK_HIDDEN_EXTERNAL_BEGIN \
QT_WARNING_PUSH \
QT_WARNING_DISABLE_GCC("-Wmissing-declarations")

#define QSK_HIDDEN_EXTERNAL_END \
QT_WARNING_POP

#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
using QskHashValue = uint;
#else
Expand Down
29 changes: 29 additions & 0 deletions src/common/QskInternalMacros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/******************************************************************************
* QSkinny - Copyright (C) The authors
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/

#ifndef QSK_INTERNAL_MACROS_H
#define QSK_INTERNAL_MACROS_H

#include <qcompilerdetection.h>

#define QSK_QT_PRIVATE_BEGIN \
QT_WARNING_PUSH \
QT_WARNING_DISABLE_GCC("-Wpragmas") \
QT_WARNING_DISABLE_GCC("-Wpedantic") \
QT_WARNING_DISABLE_GCC("-Wsuggest-override") \
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types") \
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")

#define QSK_QT_PRIVATE_END \
QT_WARNING_POP

#define QSK_HIDDEN_EXTERNAL_BEGIN \
QT_WARNING_PUSH \
QT_WARNING_DISABLE_GCC("-Wmissing-declarations")

#define QSK_HIDDEN_EXTERNAL_END \
QT_WARNING_POP

#endif
1 change: 1 addition & 0 deletions src/common/QskMetaFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskMetaFunction.h"
#include "QskInternalMacros.h"

#include <qcoreapplication.h>
#include <qobject.h>
Expand Down
1 change: 1 addition & 0 deletions src/common/QskMetaInvokable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "QskMetaInvokable.h"
#include "QskMetaFunction.h"
#include "QskInternalMacros.h"

#include <qmetaobject.h>
#include <qobject.h>
Expand Down
1 change: 1 addition & 0 deletions src/common/QskObjectCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskObjectCounter.h"
#include "QskInternalMacros.h"

#include <qdebug.h>
#include <qset.h>
Expand Down
1 change: 1 addition & 0 deletions src/common/QskPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskPlatform.h"
#include "QskInternalMacros.h"

#include <qguiapplication.h>
#include <qquickwindow.h>
Expand Down
1 change: 1 addition & 0 deletions src/common/QskRgbValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskRgbValue.h"
#include "QskInternalMacros.h"

#include <qeasingcurve.h>
#include <qimage.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskDirtyItemFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "QskDirtyItemFilter.h"
#include "QskItem.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "QskPanGestureRecognizer.h"
#include "QskGesture.h"
#include "QskInternalMacros.h"

#include <qguiapplication.h>
#include <qstylehints.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskFocusIndicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "QskAnimationHint.h"
#include "QskEvent.h"
#include "QskQuick.h"
#include "QskInternalMacros.h"

#include <qpointer.h>
#include <qquickwindow.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskGestureRecognizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskGestureRecognizer.h"
#include "QskEvent.h"
#include "QskQuick.h"
#include "QskInternalMacros.h"

#include <qcoreapplication.h>
#include <qquickitem.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskInputGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskInputGrabber.h"
#include "QskWindow.h"
#include "QskEvent.h"
#include "QskInternalMacros.h"

#include <qpointer.h>

Expand Down
1 change: 1 addition & 0 deletions src/controls/QskItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "QskSkinManager.h"
#include "QskSkin.h"
#include "QskDirtyItemFilter.h"
#include "QskInternalMacros.h"

#include <qglobalstatic.h>
#include <qquickwindow.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskItemAnchors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "QskItemAnchors.h"
#include "QskMargins.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickanchors_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskItemPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "QskGlobal.h"
#include "QskItem.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "QskSkinlet.h"
#include "QskEvent.h"
#include "QskPlatform.h"
#include "QskInternalMacros.h"

#include <qvector.h>
#include <qvariant.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "QskEvent.h"
#include "QskPlatform.h"
#include "QskHintAnimator.h"
#include "QskInternalMacros.h"

#include <qpa/qplatformintegration.h>

Expand Down
2 changes: 2 additions & 0 deletions src/controls/QskQuick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "QskFunctions.h"
#include "QskLayoutElement.h"
#include "QskPlatform.h"
#include "QskInternalMacros.h"

#include <qquickitem.h>

QSK_QT_PRIVATE_BEGIN
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskScrollArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "QskScrollViewSkinlet.h"
#include "QskBoxBorderMetrics.h"
#include "QskSGNode.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskScrollBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "QskGesture.h"
#include "QskPanGestureRecognizer.h"
#include "QskQuick.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickwindow_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskShortcutMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskShortcutMap.h"
#include "QskMetaInvokable.h"
#include "QskQuick.h"
#include "QskInternalMacros.h"

#include <qkeysequence.h>
#include <qquickitem.h>
Expand Down
2 changes: 2 additions & 0 deletions src/controls/QskSkin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
#include "QskStatusIndicator.h"
#include "QskStatusIndicatorSkinlet.h"

#include "QskInternalMacros.h"

#include <qhash.h>

static inline QskSkinlet* qskNewSkinlet( const QMetaObject* metaObject, QskSkin* skin )
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskTextInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "QskTextInputSkinlet.h"
#include "QskFontRole.h"
#include "QskQuick.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquicktextinput_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskVariantAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "QskMargins.h"
#include "QskIntervalF.h"
#include "QskTextColors.h"
#include "QskInternalMacros.h"

// Even if we don't use the standard Qt animation system we
// use its registry of interpolators: why adding our own ...
Expand Down
1 change: 1 addition & 0 deletions src/controls/QskWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "QskSetup.h"
#include "QskSkin.h"
#include "QskSkinManager.h"
#include "QskInternalMacros.h"

#include <qmath.h>
#include <qpointer.h>
Expand Down
1 change: 1 addition & 0 deletions src/graphic/QskGraphic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "QskColorFilter.h"
#include "QskGraphicPaintEngine.h"
#include "QskPainterCommand.h"
#include "QskInternalMacros.h"

#include <qguiapplication.h>
#include <qimage.h>
Expand Down
1 change: 1 addition & 0 deletions src/layouts/QskStackBoxAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "QskEvent.h"
#include "QskQuick.h"
#include "QskFunctions.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskBasicLinesNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*****************************************************************************/

#include "QskBasicLinesNode.h"
#include "QskInternalMacros.h"

#include <qsgmaterial.h>
#include <qsggeometry.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskBoxShadowNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "QskBoxShadowNode.h"
#include "QskBoxShapeMetrics.h"
#include "QskInternalMacros.h"

#include <qcolor.h>
#include <qsgmaterialshader.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskColorRamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "QskColorRamp.h"
#include "QskRgbValue.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qrhi_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskFillNodePrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define QSK_FILL_NODE_PRIVATE_H

#include "QskGlobal.h"
#include "QskInternalMacros.h"

QSK_QT_PRIVATE_BEGIN
#include <private/qsgnode_p.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskPaintedNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskPaintedNode.h"
#include "QskSGNode.h"
#include "QskTextureRenderer.h"
#include "QskInternalMacros.h"

#include <qsgimagenode.h>
#include <qquickwindow.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskPlainTextRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskPlainTextRenderer.h"
#include "QskTextColors.h"
#include "QskTextOptions.h"
#include "QskInternalMacros.h"

#include <qfontmetrics.h>
#include <qmath.h>
Expand Down
1 change: 1 addition & 0 deletions src/nodes/QskRichTextRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "QskRichTextRenderer.h"
#include "QskTextColors.h"
#include "QskTextOptions.h"
#include "QskInternalMacros.h"

#include <qglobalstatic.h>
#include <qmutex.h>
Expand Down
Loading

0 comments on commit 33a4825

Please sign in to comment.