Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit eb030aa1 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix build error on windows

I'm not totally sure what's up, but the double declaration doesn;t work:

canning dependencies of target kritaui
[ 55%] Building CXX object
libs/ui/CMakeFiles/kritaui.dir/widgets/KisScreenColorPicker.cpp.obj
C:\dev\krita\libs\ui\widgets\KisScreenColorPicker.cpp:275:83: warning:
'KisDlgInternalColorSelector::s_screenColorPickerFactory' redeclared
without dllimport attribute: previous dllimport ignored [-Wattributes]
 std::function<KisScreenColorPickerBase *(QWidget *)>
KisDlgInternalColorSelector::s_screenColorPickerFactory =
KisScreenColorPicker::createScreenColorPicker;
                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\dev\krita\libs\ui\widgets\KisScreenColorPicker.cpp: In function 'void
__tcf_3()':
C:\dev\krita\libs\ui\widgets\KisScreenColorPicker.cpp:275:54: error:
definition of static data member
'KisDlgInternalColorSelector::s_screenColorPickerFactory' of dllimport'd
class
 std::function<KisScreenColorPickerBase *(QWidget *)>
KisDlgInternalColorSelector::s_screenColorPickerFactory =
KisScreenColorPicker::createScreenColorPicker;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
libs\ui\CMakeFiles\kritaui.dir\build.make:6050: recipe for target
'libs/ui/CMakeFiles/kritaui.dir/widgets/KisScreenColorPicker.cpp.obj'
failed
mingw32-make[2]: ***
[libs/ui/CMakeFiles/kritaui.dir/widgets/KisScreenColorPicker.cpp.obj]
Error 1
CMakeFiles\Makefile2:18278: recipe for target
'libs/ui/CMakeFiles/kritaui.dir/all' failed
mingw32-make[1]: *** [libs/ui/CMakeFiles/kritaui.dir/all] Error 2
Makefile:139: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
parent ba34e750
......@@ -96,6 +96,9 @@
#include <KritaVersionWrapper.h>
#include <dialogs/KisSessionManagerDialog.h>
#include "widgets/KisScreenColorPicker.h"
#include "KisDlgInternalColorSelector.h"
namespace {
const QTime appStartTime(QTime::currentTime());
}
......@@ -159,6 +162,9 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
setMouseCoalescingEnabled(false);
#endif
KisDlgInternalColorSelector::s_screenColorPickerFactory = KisScreenColorPicker::createScreenColorPicker;
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());
setApplicationDisplayName("Krita");
......
......@@ -272,6 +272,3 @@ bool KisScreenColorPickingEventFilter::eventFilter(QObject *, QEvent *event)
return false;
}
std::function<KisScreenColorPickerBase *(QWidget *)> KisDlgInternalColorSelector::s_screenColorPickerFactory = KisScreenColorPicker::createScreenColorPicker;
#include "KisScreenColorPicker.moc"
......@@ -39,10 +39,12 @@ class KRITAWIDGETS_EXPORT KisDlgInternalColorSelector : public QDialog
{
Q_OBJECT
private:
public:
static std::function<KisScreenColorPickerBase *(QWidget *)> s_screenColorPickerFactory;
public:
struct Config
{
Config() :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment