fix build on linux and macos

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-12-12 14:55:17 +08:00
parent d04eaabde7
commit c849217d43
33 changed files with 36 additions and 36 deletions

View File

@ -19,14 +19,14 @@ jobs:
matrix:
qt-version: [5.15.2, 6.4.1]
library-type: [shared, static]
platform: [windows-latest, macos-latest] # ubuntu-latest
platform: [windows-latest, ubuntu-latest, macos-latest]
include:
- platform: windows-latest
CC: cl
CXX: cl
#- platform: ubuntu-latest
# CC: gcc
# CXX: g++
- platform: ubuntu-latest
CC: gcc
CXX: g++
- platform: macos-latest
CC: clang
CXX: clang++

View File

@ -121,7 +121,7 @@ Q_SIGNALS:
void chromeButtonColorChanged();
private:
std::unique_ptr<ChromePalettePrivate> d_ptr = nullptr;
QScopedPointer<ChromePalettePrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -62,7 +62,7 @@ Q_SIGNALS:
void wallpaperChanged();
private:
std::unique_ptr<FramelessManagerPrivate> d_ptr = nullptr;
QScopedPointer<FramelessManagerPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -65,7 +65,7 @@ Q_SIGNALS:
void shouldRedraw();
private:
std::unique_ptr<MicaMaterialPrivate> d_ptr = nullptr;
QScopedPointer<MicaMaterialPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -78,7 +78,7 @@ Q_SIGNALS:
void shouldRepaint();
private:
std::unique_ptr<WindowBorderPainterPrivate> d_ptr = nullptr;
QScopedPointer<WindowBorderPainterPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -101,7 +101,7 @@ Q_SIGNALS:
void ready();
private:
std::unique_ptr<FramelessQuickHelperPrivate> d_ptr = nullptr;
QScopedPointer<FramelessQuickHelperPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -77,7 +77,7 @@ Q_SIGNALS:
void fullScreenChanged();
private:
std::unique_ptr<FramelessQuickApplicationWindowPrivate> d_ptr = nullptr;
QScopedPointer<FramelessQuickApplicationWindowPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -77,7 +77,7 @@ Q_SIGNALS:
void fullScreenChanged();
private:
std::unique_ptr<FramelessQuickWindowPrivate> d_ptr = nullptr;
QScopedPointer<FramelessQuickWindowPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -61,7 +61,7 @@ Q_SIGNALS:
void sourceChanged();
private:
std::unique_ptr<QuickImageItemPrivate> d_ptr = nullptr;
QScopedPointer<QuickImageItemPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -53,7 +53,7 @@ protected:
void componentComplete() override;
private:
std::unique_ptr<QuickMicaMaterialPrivate> d_ptr = nullptr;
QScopedPointer<QuickMicaMaterialPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -87,7 +87,7 @@ Q_SIGNALS:
void nativeBorderChanged();
private:
std::unique_ptr<QuickWindowBorderPrivate> d_ptr = nullptr;
QScopedPointer<QuickWindowBorderPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -44,7 +44,7 @@ public:
~FramelessDialog() override;
private:
std::unique_ptr<FramelessDialogPrivate> d_ptr = nullptr;
QScopedPointer<FramelessDialogPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -59,7 +59,7 @@ Q_SIGNALS:
void zoomedChanged();
private:
std::unique_ptr<FramelessMainWindowPrivate> d_ptr = nullptr;
QScopedPointer<FramelessMainWindowPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -59,7 +59,7 @@ Q_SIGNALS:
void zoomedChanged();
private:
std::unique_ptr<FramelessWidgetPrivate> d_ptr = nullptr;
QScopedPointer<FramelessWidgetPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -88,7 +88,7 @@ Q_SIGNALS:
void ready();
private:
std::unique_ptr<FramelessWidgetsHelperPrivate> d_ptr = nullptr;
QScopedPointer<FramelessWidgetsHelperPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -100,7 +100,7 @@ Q_SIGNALS:
void iconSize2Changed();
private:
std::unique_ptr<StandardSystemButtonPrivate> d_ptr = nullptr;
QScopedPointer<StandardSystemButtonPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -98,7 +98,7 @@ Q_SIGNALS:
void titleFontChanged();
private:
std::unique_ptr<StandardTitleBarPrivate> d_ptr = nullptr;
QScopedPointer<StandardTitleBarPrivate> d_ptr;
};
FRAMELESSHELPER_END_NAMESPACE

View File

@ -138,7 +138,7 @@ void ChromePalettePrivate::refresh()
}
ChromePalette::ChromePalette(QObject *parent) :
QObject(parent), d_ptr(std::make_unique<ChromePalettePrivate>(this))
QObject(parent), d_ptr(new ChromePalettePrivate(this))
{
}

View File

@ -371,7 +371,7 @@ void FramelessManagerPrivate::initialize()
}
FramelessManager::FramelessManager(QObject *parent) :
QObject(parent), d_ptr(std::make_unique<FramelessManagerPrivate>(this))
QObject(parent), d_ptr(new FramelessManagerPrivate(this))
{
}

View File

@ -664,7 +664,7 @@ void MicaMaterialPrivate::prepareGraphicsResources()
}
MicaMaterial::MicaMaterial(QObject *parent)
: QObject(parent), d_ptr(std::make_unique<MicaMaterialPrivate>(this))
: QObject(parent), d_ptr(new MicaMaterialPrivate(this))
{
}

View File

@ -174,7 +174,7 @@ void WindowBorderPainterPrivate::initialize()
}
WindowBorderPainter::WindowBorderPainter(QObject *parent)
: QObject(parent), d_ptr(std::make_unique<WindowBorderPainterPrivate>(this))
: QObject(parent), d_ptr(new WindowBorderPainterPrivate(this))
{
}

View File

@ -170,7 +170,7 @@ void FramelessQuickApplicationWindowPrivate::initialize()
}
FramelessQuickApplicationWindow::FramelessQuickApplicationWindow(QWindow *parent)
: QQuickApplicationWindow(parent), d_ptr(std::make_unique<FramelessQuickApplicationWindowPrivate>(this))
: QQuickApplicationWindow(parent), d_ptr(new FramelessQuickApplicationWindowPrivate(this))
{
}

View File

@ -957,7 +957,7 @@ void FramelessQuickHelperPrivate::rebindWindow()
}
FramelessQuickHelper::FramelessQuickHelper(QQuickItem *parent)
: QQuickItem(parent), d_ptr(std::make_unique<FramelessQuickHelperPrivate>(this))
: QQuickItem(parent), d_ptr(new FramelessQuickHelperPrivate(this))
{
}

View File

@ -170,7 +170,7 @@ void FramelessQuickWindowPrivate::initialize()
}
FramelessQuickWindow::FramelessQuickWindow(QWindow *parent)
: QQuickWindowQmlImpl(parent), d_ptr(std::make_unique<FramelessQuickWindowPrivate>(this))
: QQuickWindowQmlImpl(parent), d_ptr(new FramelessQuickWindowPrivate(this))
{
}

View File

@ -220,7 +220,7 @@ QRect QuickImageItemPrivate::paintArea() const
}
QuickImageItem::QuickImageItem(QQuickItem *parent)
: QQuickPaintedItem(parent), d_ptr(std::make_unique<QuickImageItemPrivate>(this))
: QQuickPaintedItem(parent), d_ptr(new QuickImageItemPrivate(this))
{
}

View File

@ -244,7 +244,7 @@ void QuickMicaMaterialPrivate::appendNode(WallpaperImageNode *node)
}
QuickMicaMaterial::QuickMicaMaterial(QQuickItem *parent)
: QQuickItem(parent), d_ptr(std::make_unique<QuickMicaMaterialPrivate>(this))
: QQuickItem(parent), d_ptr(new QuickMicaMaterialPrivate(this))
{
}

View File

@ -192,7 +192,7 @@ void QuickWindowBorderPrivate::rebindWindow()
}
QuickWindowBorder::QuickWindowBorder(QQuickItem *parent)
: QQuickPaintedItem(parent), d_ptr(std::make_unique<QuickWindowBorderPrivate>(this))
: QQuickPaintedItem(parent), d_ptr(new QuickWindowBorderPrivate(this))
{
}

View File

@ -90,7 +90,7 @@ WidgetsSharedHelper *FramelessDialogPrivate::widgetsSharedHelper() const
}
FramelessDialog::FramelessDialog(QWidget *parent)
: QDialog(parent), d_ptr(std::make_unique<FramelessDialogPrivate>(this))
: QDialog(parent), d_ptr(new FramelessDialogPrivate(this))
{
}

View File

@ -123,7 +123,7 @@ WidgetsSharedHelper *FramelessMainWindowPrivate::widgetsSharedHelper() const
}
FramelessMainWindow::FramelessMainWindow(QWidget *parent, const Qt::WindowFlags flags)
: QMainWindow(parent, flags), d_ptr(std::make_unique<FramelessMainWindowPrivate>(this))
: QMainWindow(parent, flags), d_ptr(new FramelessMainWindowPrivate(this))
{
}

View File

@ -123,7 +123,7 @@ WidgetsSharedHelper *FramelessWidgetPrivate::widgetsSharedHelper() const
}
FramelessWidget::FramelessWidget(QWidget *parent)
: QWidget(parent), d_ptr(std::make_unique<FramelessWidgetPrivate>(this))
: QWidget(parent), d_ptr(new FramelessWidgetPrivate(this))
{
}

View File

@ -882,7 +882,7 @@ void FramelessWidgetsHelperPrivate::setSystemButton(QWidget *widget, const Syste
}
FramelessWidgetsHelper::FramelessWidgetsHelper(QObject *parent)
: QObject(parent), d_ptr(std::make_unique<FramelessWidgetsHelperPrivate>(this))
: QObject(parent), d_ptr(new FramelessWidgetsHelperPrivate(this))
{
}

View File

@ -399,7 +399,7 @@ void StandardSystemButtonPrivate::initialize()
}
StandardSystemButton::StandardSystemButton(QWidget *parent)
: QAbstractButton(parent), d_ptr(std::make_unique<StandardSystemButtonPrivate>(this))
: QAbstractButton(parent), d_ptr(new StandardSystemButtonPrivate(this))
{
}

View File

@ -504,7 +504,7 @@ void StandardTitleBarPrivate::initialize()
}
StandardTitleBar::StandardTitleBar(QWidget *parent)
: QWidget(parent), d_ptr(std::make_unique<StandardTitleBarPrivate>(this))
: QWidget(parent), d_ptr(new StandardTitleBarPrivate(this))
{
}