Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
George Gianacopoulos
Krita
Commits
09b9cf99
Commit
09b9cf99
authored
Apr 18, 2019
by
Ivan Yossi
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated Q_OS_OSX for Q_OS_MACOS
parent
81c2bb6a
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
54 additions
and
54 deletions
+54
-54
cmake/modules/MacroKritaAddBenchmark.cmake
cmake/modules/MacroKritaAddBenchmark.cmake
+1
-1
libs/image/kis_image_config.cpp
libs/image/kis_image_config.cpp
+5
-5
libs/koplugin/KoJsonTrader.cpp
libs/koplugin/KoJsonTrader.cpp
+3
-3
libs/ui/KisApplication.cpp
libs/ui/KisApplication.cpp
+2
-2
libs/ui/KisMainWindow.cpp
libs/ui/KisMainWindow.cpp
+3
-3
libs/ui/canvas/kis_qpainter_canvas.cpp
libs/ui/canvas/kis_qpainter_canvas.cpp
+1
-1
libs/ui/input/kis_input_manager.cpp
libs/ui/input/kis_input_manager.cpp
+3
-3
libs/ui/input/kis_input_manager_p.cpp
libs/ui/input/kis_input_manager_p.cpp
+3
-3
libs/ui/opengl/KisOpenGLModeProber.h
libs/ui/opengl/KisOpenGLModeProber.h
+1
-1
libs/ui/opengl/kis_opengl.cpp
libs/ui/opengl/kis_opengl.cpp
+1
-1
libs/ui/opengl/kis_opengl_canvas2.cpp
libs/ui/opengl/kis_opengl_canvas2.cpp
+7
-7
libs/ui/opengl/kis_opengl_canvas2.h
libs/ui/opengl/kis_opengl_canvas2.h
+2
-2
libs/ui/opengl/kis_opengl_canvas2_p.h
libs/ui/opengl/kis_opengl_canvas2_p.h
+1
-1
libs/ui/opengl/kis_opengl_p.h
libs/ui/opengl/kis_opengl_p.h
+1
-1
libs/ui/opengl/kis_opengl_shader_loader.cpp
libs/ui/opengl/kis_opengl_shader_loader.cpp
+2
-2
libs/ui/thememanager.cpp
libs/ui/thememanager.cpp
+1
-1
libs/ui/widgets/KoDualColorButton.cpp
libs/ui/widgets/KoDualColorButton.cpp
+2
-2
libs/widgets/KoZoomInput.cpp
libs/widgets/KoZoomInput.cpp
+1
-1
libs/widgets/kis_color_button.cpp
libs/widgets/kis_color_button.cpp
+7
-7
libs/widgetutils/KoFileDialog.cpp
libs/widgetutils/KoFileDialog.cpp
+1
-1
libs/widgetutils/KoResourcePaths.cpp
libs/widgetutils/KoResourcePaths.cpp
+3
-3
libs/widgetutils/xmlgui/kkeysequencewidget.cpp
libs/widgetutils/xmlgui/kkeysequencewidget.cpp
+1
-1
plugins/flake/textshape/TextTool.cpp
plugins/flake/textshape/TextTool.cpp
+1
-1
plugins/tools/svgtexttool/SvgTextEditor.cpp
plugins/tools/svgtexttool/SvgTextEditor.cpp
+1
-1
No files found.
cmake/modules/MacroKritaAddBenchmark.cmake
View file @
09b9cf99
...
@@ -49,7 +49,7 @@ macro (KRITA_ADD_BENCHMARK _test_NAME)
...
@@ -49,7 +49,7 @@ macro (KRITA_ADD_BENCHMARK _test_NAME)
# .bat because of rpath handling
# .bat because of rpath handling
set
(
_executable
"
${
loc
}
.bat"
)
set
(
_executable
"
${
loc
}
.bat"
)
else
()
else
()
if
(
Q_OS_
OSX
AND NOT _nogui
)
if
(
Q_OS_
MACOS
AND NOT _nogui
)
set
(
_executable
${
EXECUTABLE_OUTPUT_PATH
}
/
${
_test_NAME
}
.app/Contents/MacOS/
${
_test_NAME
}
)
set
(
_executable
${
EXECUTABLE_OUTPUT_PATH
}
/
${
_test_NAME
}
.app/Contents/MacOS/
${
_test_NAME
}
)
else
()
else
()
# .shell because of rpath handling
# .shell because of rpath handling
...
...
libs/image/kis_image_config.cpp
View file @
09b9cf99
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include "kis_global.h"
#include "kis_global.h"
#include <cmath>
#include <cmath>
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
#include <errno.h>
#include <errno.h>
#endif
#endif
...
@@ -46,7 +46,7 @@ KisImageConfig::KisImageConfig(bool readOnly)
...
@@ -46,7 +46,7 @@ KisImageConfig::KisImageConfig(bool readOnly)
if
(
!
readOnly
)
{
if
(
!
readOnly
)
{
KIS_SAFE_ASSERT_RECOVER_RETURN
(
qApp
->
thread
()
==
QThread
::
currentThread
());
KIS_SAFE_ASSERT_RECOVER_RETURN
(
qApp
->
thread
()
==
QThread
::
currentThread
());
}
}
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
// clear /var/folders/ swap path set by old broken Krita swap implementation in order to use new default swap dir.
// clear /var/folders/ swap path set by old broken Krita swap implementation in order to use new default swap dir.
QString
swap
=
m_config
.
readEntry
(
"swaplocation"
,
""
);
QString
swap
=
m_config
.
readEntry
(
"swaplocation"
,
""
);
if
(
swap
.
startsWith
(
"/var/folders/"
))
{
if
(
swap
.
startsWith
(
"/var/folders/"
))
{
...
@@ -231,7 +231,7 @@ void KisImageConfig::setMemoryPoolLimitPercent(qreal value)
...
@@ -231,7 +231,7 @@ void KisImageConfig::setMemoryPoolLimitPercent(qreal value)
QString
KisImageConfig
::
safelyGetWritableTempLocation
(
const
QString
&
suffix
,
const
QString
&
configKey
,
bool
requestDefault
)
const
QString
KisImageConfig
::
safelyGetWritableTempLocation
(
const
QString
&
suffix
,
const
QString
&
configKey
,
bool
requestDefault
)
const
{
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
// On OSX, QDir::tempPath() gives us a folder we cannot reply upon (usually
// On OSX, QDir::tempPath() gives us a folder we cannot reply upon (usually
// something like /var/folders/.../...) and that will have vanished when we
// something like /var/folders/.../...) and that will have vanished when we
// try to create the tmp file in KisMemoryWindow::KisMemoryWindow using
// try to create the tmp file in KisMemoryWindow::KisMemoryWindow using
...
@@ -359,7 +359,7 @@ void KisImageConfig::setLazyFrameCreationEnabled(bool value)
...
@@ -359,7 +359,7 @@ void KisImageConfig::setLazyFrameCreationEnabled(bool value)
#include <sys/sysctl.h>
#include <sys/sysctl.h>
#elif defined Q_OS_WIN
#elif defined Q_OS_WIN
#include <windows.h>
#include <windows.h>
#elif defined Q_OS_
OSX
#elif defined Q_OS_
MACOS
#include <sys/types.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/sysctl.h>
#endif
#endif
...
@@ -403,7 +403,7 @@ int KisImageConfig::totalRAM()
...
@@ -403,7 +403,7 @@ int KisImageConfig::totalRAM()
# if defined ENV32BIT
# if defined ENV32BIT
totalMemory
=
qMin
(
totalMemory
,
2000
);
totalMemory
=
qMin
(
totalMemory
,
2000
);
# endif
# endif
#elif defined Q_OS_
OSX
#elif defined Q_OS_
MACOS
int
mib
[
2
]
=
{
CTL_HW
,
HW_MEMSIZE
};
int
mib
[
2
]
=
{
CTL_HW
,
HW_MEMSIZE
};
u_int
namelen
=
sizeof
(
mib
)
/
sizeof
(
mib
[
0
]);
u_int
namelen
=
sizeof
(
mib
)
/
sizeof
(
mib
[
0
]);
uint64_t
size
;
uint64_t
size
;
...
...
libs/koplugin/KoJsonTrader.cpp
View file @
09b9cf99
...
@@ -45,7 +45,7 @@ KoJsonTrader::KoJsonTrader()
...
@@ -45,7 +45,7 @@ KoJsonTrader::KoJsonTrader()
QDir
appDir
(
qApp
->
applicationDirPath
());
QDir
appDir
(
qApp
->
applicationDirPath
());
appDir
.
cdUp
();
appDir
.
cdUp
();
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
// Help Krita run without deployment
// Help Krita run without deployment
QDir
d
(
appDir
);
QDir
d
(
appDir
);
d
.
cd
(
"../../../"
);
d
.
cd
(
"../../../"
);
...
@@ -58,13 +58,13 @@ KoJsonTrader::KoJsonTrader()
...
@@ -58,13 +58,13 @@ KoJsonTrader::KoJsonTrader()
#endif
#endif
Q_FOREACH
(
const
QDir
&
dir
,
searchDirs
)
{
Q_FOREACH
(
const
QDir
&
dir
,
searchDirs
)
{
const
QStringList
nameFilters
=
{
const
QStringList
nameFilters
=
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
"*PlugIns*"
,
"*PlugIns*"
,
#endif
#endif
"lib*"
,
"lib*"
,
};
};
Q_FOREACH
(
const
QFileInfo
&
info
,
dir
.
entryInfoList
(
nameFilters
,
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
Q_FOREACH
(
const
QFileInfo
&
info
,
dir
.
entryInfoList
(
nameFilters
,
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
if
(
info
.
fileName
().
contains
(
"PlugIns"
))
{
if
(
info
.
fileName
().
contains
(
"PlugIns"
))
{
m_pluginPath
=
info
.
absoluteFilePath
();
m_pluginPath
=
info
.
absoluteFilePath
();
break
;
break
;
...
...
libs/ui/KisApplication.cpp
View file @
09b9cf99
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include <tchar.h>
#include <tchar.h>
#endif
#endif
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
#include "osx.h"
#include "osx.h"
#endif
#endif
...
@@ -138,7 +138,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
...
@@ -138,7 +138,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
:
QtSingleApplication
(
key
,
argc
,
argv
)
:
QtSingleApplication
(
key
,
argc
,
argv
)
,
d
(
new
Private
)
,
d
(
new
Private
)
{
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
setMouseCoalescingEnabled
(
false
);
setMouseCoalescingEnabled
(
false
);
#endif
#endif
...
...
libs/ui/KisMainWindow.cpp
View file @
09b9cf99
...
@@ -313,7 +313,7 @@ KisMainWindow::KisMainWindow(QUuid uuid)
...
@@ -313,7 +313,7 @@ KisMainWindow::KisMainWindow(QUuid uuid)
qApp
->
setStartDragDistance
(
25
);
// 25 px is a distance that works well for Tablet and Mouse events
qApp
->
setStartDragDistance
(
25
);
// 25 px is a distance that works well for Tablet and Mouse events
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
setUnifiedTitleAndToolBarOnMac
(
true
);
setUnifiedTitleAndToolBarOnMac
(
true
);
#endif
#endif
...
@@ -1961,7 +1961,7 @@ QDockWidget* KisMainWindow::createDockWidget(KoDockFactoryBase* factory)
...
@@ -1961,7 +1961,7 @@ QDockWidget* KisMainWindow::createDockWidget(KoDockFactoryBase* factory)
dockWidget
=
d
->
dockWidgetsMap
[
factory
->
id
()];
dockWidget
=
d
->
dockWidgetsMap
[
factory
->
id
()];
}
}
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
dockWidget
->
setAttribute
(
Qt
::
WA_MacSmallSize
,
true
);
dockWidget
->
setAttribute
(
Qt
::
WA_MacSmallSize
,
true
);
#endif
#endif
dockWidget
->
setFont
(
KoDockRegistry
::
dockFont
());
dockWidget
->
setFont
(
KoDockRegistry
::
dockFont
());
...
@@ -2408,7 +2408,7 @@ void KisMainWindow::newOptionWidgets(KoCanvasController *controller, const QList
...
@@ -2408,7 +2408,7 @@ void KisMainWindow::newOptionWidgets(KoCanvasController *controller, const QList
if
(
!
isOurOwnView
)
return
;
if
(
!
isOurOwnView
)
return
;
Q_FOREACH
(
QWidget
*
w
,
optionWidgetList
)
{
Q_FOREACH
(
QWidget
*
w
,
optionWidgetList
)
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
w
->
setAttribute
(
Qt
::
WA_MacSmallSize
,
true
);
w
->
setAttribute
(
Qt
::
WA_MacSmallSize
,
true
);
#endif
#endif
w
->
setFont
(
KoDockRegistry
::
dockFont
());
w
->
setFont
(
KoDockRegistry
::
dockFont
());
...
...
libs/ui/canvas/kis_qpainter_canvas.cpp
View file @
09b9cf99
...
@@ -79,7 +79,7 @@ KisQPainterCanvas::KisQPainterCanvas(KisCanvas2 *canvas, KisCoordinatesConverter
...
@@ -79,7 +79,7 @@ KisQPainterCanvas::KisQPainterCanvas(KisCanvas2 *canvas, KisCoordinatesConverter
setAttribute
(
Qt
::
WA_InputMethodEnabled
,
false
);
setAttribute
(
Qt
::
WA_InputMethodEnabled
,
false
);
setAttribute
(
Qt
::
WA_StaticContents
);
setAttribute
(
Qt
::
WA_StaticContents
);
setAttribute
(
Qt
::
WA_OpaquePaintEvent
);
setAttribute
(
Qt
::
WA_OpaquePaintEvent
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
false
);
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
false
);
#else
#else
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
true
);
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
true
);
...
...
libs/ui/input/kis_input_manager.cpp
View file @
09b9cf99
...
@@ -377,7 +377,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
...
@@ -377,7 +377,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
d
->
debugEvent
<
QWheelEvent
,
false
>
(
event
);
d
->
debugEvent
<
QWheelEvent
,
false
>
(
event
);
QWheelEvent
*
wheelEvent
=
static_cast
<
QWheelEvent
*>
(
event
);
QWheelEvent
*
wheelEvent
=
static_cast
<
QWheelEvent
*>
(
event
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
// Some QT wheel events are actually touch pad pan events. From the QT docs:
// Some QT wheel events are actually touch pad pan events. From the QT docs:
// "Wheel events are generated for both mouse wheels and trackpad scroll gestures."
// "Wheel events are generated for both mouse wheels and trackpad scroll gestures."
...
@@ -398,7 +398,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
...
@@ -398,7 +398,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
* Ignore delta 0 events on OSX, since they are triggered by tablet
* Ignore delta 0 events on OSX, since they are triggered by tablet
* proximity when using Wacom devices.
* proximity when using Wacom devices.
*/
*/
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
if
(
wheelEvent
->
delta
()
==
0
)
{
if
(
wheelEvent
->
delta
()
==
0
)
{
retval
=
true
;
retval
=
true
;
break
;
break
;
...
@@ -595,7 +595,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
...
@@ -595,7 +595,7 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
d
->
touchHasBlockedPressEvents
=
KisConfig
(
true
).
disableTouchOnCanvas
();
d
->
touchHasBlockedPressEvents
=
KisConfig
(
true
).
disableTouchOnCanvas
();
KisAbstractInputAction
::
setInputManager
(
this
);
KisAbstractInputAction
::
setInputManager
(
this
);
retval
=
d
->
matcher
.
touchUpdateEvent
(
tevent
);
retval
=
d
->
matcher
.
touchUpdateEvent
(
tevent
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
}
}
#endif
#endif
event
->
accept
();
event
->
accept
();
...
...
libs/ui/input/kis_input_manager_p.cpp
View file @
09b9cf99
...
@@ -395,7 +395,7 @@ bool KisInputManager::Private::ProximityNotifier::eventFilter(QObject* object, Q
...
@@ -395,7 +395,7 @@ bool KisInputManager::Private::ProximityNotifier::eventFilter(QObject* object, Q
// Qt sends fake mouse events instead of hover events, so not very useful.
// Qt sends fake mouse events instead of hover events, so not very useful.
// Don't block mouse events on tablet since tablet move events are not generated until
// Don't block mouse events on tablet since tablet move events are not generated until
// after tablet press.
// after tablet press.
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
d
->
blockMouseEvents
();
d
->
blockMouseEvents
();
#else
#else
// Notify input manager that tablet proximity is entered for Genius tablets.
// Notify input manager that tablet proximity is entered for Genius tablets.
...
@@ -405,7 +405,7 @@ bool KisInputManager::Private::ProximityNotifier::eventFilter(QObject* object, Q
...
@@ -405,7 +405,7 @@ bool KisInputManager::Private::ProximityNotifier::eventFilter(QObject* object, Q
case
QEvent
:
:
TabletLeaveProximity
:
case
QEvent
:
:
TabletLeaveProximity
:
d
->
debugEvent
<
QEvent
,
false
>
(
event
);
d
->
debugEvent
<
QEvent
,
false
>
(
event
);
d
->
allowMouseEvents
();
d
->
allowMouseEvents
();
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
d
->
setTabletActive
(
false
);
d
->
setTabletActive
(
false
);
#endif
#endif
break
;
break
;
...
@@ -522,7 +522,7 @@ bool KisInputManager::Private::addNativeGestureShortcut(KisAbstractInputAction*
...
@@ -522,7 +522,7 @@ bool KisInputManager::Private::addNativeGestureShortcut(KisAbstractInputAction*
// Qt5 only implements QNativeGestureEvent for macOS
// Qt5 only implements QNativeGestureEvent for macOS
Qt
::
NativeGestureType
type
;
Qt
::
NativeGestureType
type
;
switch
(
gesture
)
{
switch
(
gesture
)
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
case
KisShortcutConfiguration
:
:
PinchGesture
:
case
KisShortcutConfiguration
:
:
PinchGesture
:
type
=
Qt
::
ZoomNativeGesture
;
type
=
Qt
::
ZoomNativeGesture
;
break
;
break
;
...
...
libs/ui/opengl/KisOpenGLModeProber.h
View file @
09b9cf99
...
@@ -87,7 +87,7 @@ public:
...
@@ -87,7 +87,7 @@ public:
bool
isSupportedVersion
()
const
{
bool
isSupportedVersion
()
const
{
return
return
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
((
m_glMajorVersion
*
100
+
m_glMinorVersion
)
>=
302
)
((
m_glMajorVersion
*
100
+
m_glMinorVersion
)
>=
302
)
#else
#else
(
m_glMajorVersion
>=
3
&&
(
m_supportsDeprecatedFunctions
||
m_isOpenGLES
))
||
(
m_glMajorVersion
>=
3
&&
(
m_supportsDeprecatedFunctions
||
m_isOpenGLES
))
||
...
...
libs/ui/opengl/kis_opengl.cpp
View file @
09b9cf99
...
@@ -353,7 +353,7 @@ QSurfaceFormat generateSurfaceFormat(QSurfaceFormat::RenderableType renderer,
...
@@ -353,7 +353,7 @@ QSurfaceFormat generateSurfaceFormat(QSurfaceFormat::RenderableType renderer,
bool
debugContext
)
bool
debugContext
)
{
{
QSurfaceFormat
format
;
QSurfaceFormat
format
;
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
format
.
setVersion
(
3
,
2
);
format
.
setVersion
(
3
,
2
);
format
.
setProfile
(
QSurfaceFormat
::
CoreProfile
);
format
.
setProfile
(
QSurfaceFormat
::
CoreProfile
);
#else
#else
...
...
libs/ui/opengl/kis_opengl_canvas2.cpp
View file @
09b9cf99
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include "KisOpenGLModeProber.h"
#include "KisOpenGLModeProber.h"
#include <KoColorModelStandardIds.h>
#include <KoColorModelStandardIds.h>
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
#include <QOpenGLFunctions_2_1>
#include <QOpenGLFunctions_2_1>
#endif
#endif
...
@@ -104,7 +104,7 @@ public:
...
@@ -104,7 +104,7 @@ public:
QVector3D
vertices
[
6
];
QVector3D
vertices
[
6
];
QVector2D
texCoords
[
6
];
QVector2D
texCoords
[
6
];
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
QOpenGLFunctions_2_1
*
glFn201
;
QOpenGLFunctions_2_1
*
glFn201
;
#endif
#endif
...
@@ -162,7 +162,7 @@ KisOpenGLCanvas2::KisOpenGLCanvas2(KisCanvas2 *canvas,
...
@@ -162,7 +162,7 @@ KisOpenGLCanvas2::KisOpenGLCanvas2(KisCanvas2 *canvas,
setFocusPolicy
(
Qt
::
StrongFocus
);
setFocusPolicy
(
Qt
::
StrongFocus
);
setAttribute
(
Qt
::
WA_NoSystemBackground
,
true
);
setAttribute
(
Qt
::
WA_NoSystemBackground
,
true
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
false
);
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
false
);
#else
#else
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
true
);
setAttribute
(
Qt
::
WA_AcceptTouchEvents
,
true
);
...
@@ -267,7 +267,7 @@ void KisOpenGLCanvas2::initializeGL()
...
@@ -267,7 +267,7 @@ void KisOpenGLCanvas2::initializeGL()
{
{
KisOpenGL
::
initializeContext
(
context
());
KisOpenGL
::
initializeContext
(
context
());
initializeOpenGLFunctions
();
initializeOpenGLFunctions
();
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
if
(
!
KisOpenGL
::
hasOpenGLES
())
{
if
(
!
KisOpenGL
::
hasOpenGLES
())
{
d
->
glFn201
=
context
()
->
versionFunctions
<
QOpenGLFunctions_2_1
>
();
d
->
glFn201
=
context
()
->
versionFunctions
<
QOpenGLFunctions_2_1
>
();
if
(
!
d
->
glFn201
)
{
if
(
!
d
->
glFn201
)
{
...
@@ -442,7 +442,7 @@ void KisOpenGLCanvas2::paintToolOutline(const QPainterPath &path)
...
@@ -442,7 +442,7 @@ void KisOpenGLCanvas2::paintToolOutline(const QPainterPath &path)
glHint
(
GL_LINE_SMOOTH_HINT
,
GL_NICEST
);
glHint
(
GL_LINE_SMOOTH_HINT
,
GL_NICEST
);
glEnable
(
GL_COLOR_LOGIC_OP
);
glEnable
(
GL_COLOR_LOGIC_OP
);
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
if
(
d
->
glFn201
)
{
if
(
d
->
glFn201
)
{
d
->
glFn201
->
glLogicOp
(
GL_XOR
);
d
->
glFn201
->
glLogicOp
(
GL_XOR
);
}
}
...
@@ -997,7 +997,7 @@ QRect KisOpenGLCanvas2::updateCanvasProjection(KisUpdateInfoSP info)
...
@@ -997,7 +997,7 @@ QRect KisOpenGLCanvas2::updateCanvasProjection(KisUpdateInfoSP info)
QVector
<
QRect
>
KisOpenGLCanvas2
::
updateCanvasProjection
(
const
QVector
<
KisUpdateInfoSP
>
&
infoObjects
)
QVector
<
QRect
>
KisOpenGLCanvas2
::
updateCanvasProjection
(
const
QVector
<
KisUpdateInfoSP
>
&
infoObjects
)
{
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
/**
/**
* On OSX openGL defferent (shared) contexts have different execution queues.
* On OSX openGL defferent (shared) contexts have different execution queues.
* It means that the textures uploading and their painting can be easily reordered.
* It means that the textures uploading and their painting can be easily reordered.
...
@@ -1013,7 +1013,7 @@ QVector<QRect> KisOpenGLCanvas2::updateCanvasProjection(const QVector<KisUpdateI
...
@@ -1013,7 +1013,7 @@ QVector<QRect> KisOpenGLCanvas2::updateCanvasProjection(const QVector<KisUpdateI
QVector
<
QRect
>
result
=
KisCanvasWidgetBase
::
updateCanvasProjection
(
infoObjects
);
QVector
<
QRect
>
result
=
KisCanvasWidgetBase
::
updateCanvasProjection
(
infoObjects
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
if
(
oldContext
)
{
if
(
oldContext
)
{
oldContext
->
makeCurrent
(
oldSurface
);
oldContext
->
makeCurrent
(
oldSurface
);
}
else
{
}
else
{
...
...
libs/ui/opengl/kis_opengl_canvas2.h
View file @
09b9cf99
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#define KIS_OPENGL_CANVAS_2_H
#define KIS_OPENGL_CANVAS_2_H
#include <QOpenGLWidget>
#include <QOpenGLWidget>
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
#include <QOpenGLFunctions>
#include <QOpenGLFunctions>
#else
#else
#include <QOpenGLFunctions_3_2_Core>
#include <QOpenGLFunctions_3_2_Core>
...
@@ -38,7 +38,7 @@ class QOpenGLShaderProgram;
...
@@ -38,7 +38,7 @@ class QOpenGLShaderProgram;
class
QPainterPath
;
class
QPainterPath
;
#ifndef Q_MOC_RUN
#ifndef Q_MOC_RUN
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
#define GLFunctions QOpenGLFunctions
#define GLFunctions QOpenGLFunctions
#else
#else
#define GLFunctions QOpenGLFunctions_3_2_Core
#define GLFunctions QOpenGLFunctions_3_2_Core
...
...
libs/ui/opengl/kis_opengl_canvas2_p.h
View file @
09b9cf99
...
@@ -76,7 +76,7 @@ namespace Sync {
...
@@ -76,7 +76,7 @@ namespace Sync {
#endif
#endif
k_glClientWaitSync
=
(
kis_glClientWaitSync
)
ctx
->
getProcAddress
(
"glClientWaitSync"
);
k_glClientWaitSync
=
(
kis_glClientWaitSync
)
ctx
->
getProcAddress
(
"glClientWaitSync"
);
}
}
#elif defined Q_OS_LINUX || defined Q_OS_
OSX
#elif defined Q_OS_LINUX || defined Q_OS_
MACOS
if
(
KisOpenGL
::
supportsFenceSync
())
{
if
(
KisOpenGL
::
supportsFenceSync
())
{
k_glFenceSync
=
(
kis_glFenceSync
)
ctx
->
getProcAddress
(
"glFenceSync"
);
k_glFenceSync
=
(
kis_glFenceSync
)
ctx
->
getProcAddress
(
"glFenceSync"
);
k_glGetSynciv
=
(
kis_glGetSynciv
)
ctx
->
getProcAddress
(
"glGetSynciv"
);
k_glGetSynciv
=
(
kis_glGetSynciv
)
ctx
->
getProcAddress
(
"glGetSynciv"
);
...
...
libs/ui/opengl/kis_opengl_p.h
View file @
09b9cf99
...
@@ -66,7 +66,7 @@ public:
...
@@ -66,7 +66,7 @@ public:
bool
isSupportedVersion
()
const
{
bool
isSupportedVersion
()
const
{
return
return
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
((
m_glMajorVersion
*
100
+
m_glMinorVersion
)
>=
302
)
((
m_glMajorVersion
*
100
+
m_glMinorVersion
)
>=
302
)
#else
#else
(
m_glMajorVersion
>=
3
&&
(
m_supportsDeprecatedFunctions
||
m_isOpenGLES
))
||
(
m_glMajorVersion
>=
3
&&
(
m_supportsDeprecatedFunctions
||
m_isOpenGLES
))
||
...
...
libs/ui/opengl/kis_opengl_shader_loader.cpp
View file @
09b9cf99
...
@@ -61,7 +61,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
...
@@ -61,7 +61,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
QByteArray
vertSource
;
QByteArray
vertSource
;
// XXX Check can be removed and set to the MAC version after we move to Qt5.7
// XXX Check can be removed and set to the MAC version after we move to Qt5.7
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
vertSource
.
append
(
KisOpenGL
::
hasOpenGL3
()
?
"#version 150 core
\n
"
:
"#version 120
\n
"
);
vertSource
.
append
(
KisOpenGL
::
hasOpenGL3
()
?
"#version 150 core
\n
"
:
"#version 120
\n
"
);
// OpenColorIO doesn't support the new GLSL version yet.
// OpenColorIO doesn't support the new GLSL version yet.
vertSource
.
append
(
"#define texture2D texture
\n
"
);
vertSource
.
append
(
"#define texture2D texture
\n
"
);
...
@@ -86,7 +86,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
...
@@ -86,7 +86,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
QByteArray
fragSource
;
QByteArray
fragSource
;
// XXX Check can be removed and set to the MAC version after we move to Qt5.7
// XXX Check can be removed and set to the MAC version after we move to Qt5.7
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
fragSource
.
append
(
KisOpenGL
::
hasOpenGL3
()
?
"#version 150 core
\n
"
:
"#version 120
\n
"
);
fragSource
.
append
(
KisOpenGL
::
hasOpenGL3
()
?
"#version 150 core
\n
"
:
"#version 120
\n
"
);
// OpenColorIO doesn't support the new GLSL version yet.
// OpenColorIO doesn't support the new GLSL version yet.
fragSource
.
append
(
"#define texture2D texture
\n
"
);
fragSource
.
append
(
"#define texture2D texture
\n
"
);
...
...
libs/ui/thememanager.cpp
View file @
09b9cf99
...
@@ -188,7 +188,7 @@ void ThemeManager::slotChangePalette()
...
@@ -188,7 +188,7 @@ void ThemeManager::slotChangePalette()
qApp
->
setProperty
(
"KDE_COLOR_SCHEME_PATH"
,
filename
);
qApp
->
setProperty
(
"KDE_COLOR_SCHEME_PATH"
,
filename
);
qApp
->
setPalette
(
palette
);
qApp
->
setPalette
(
palette
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
if
(
theme
==
"Krita bright"
||
theme
.
isEmpty
())
{
if
(
theme
==
"Krita bright"
||
theme
.
isEmpty
())
{
qApp
->
setStyle
(
"Macintosh"
);
qApp
->
setStyle
(
"Macintosh"
);
qApp
->
style
()
->
polish
(
qApp
);
qApp
->
style
()
->
polish
(
qApp
);
...
...
libs/ui/widgets/KoDualColorButton.cpp
View file @
09b9cf99
...
@@ -343,7 +343,7 @@ void KoDualColorButton::mouseReleaseEvent( QMouseEvent *event )
...
@@ -343,7 +343,7 @@ void KoDualColorButton::mouseReleaseEvent( QMouseEvent *event )
if
(
foregroundRect
.
contains
(
event
->
pos
()))
{
if
(
foregroundRect
.
contains
(
event
->
pos
()))
{
if
(
d
->
tmpSelection
==
Foreground
)
{
if
(
d
->
tmpSelection
==
Foreground
)
{
if
(
d
->
popDialog
)
{
if
(
d
->
popDialog
)
{
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
d
->
colorSelectorDialog
->
setPreviousColor
(
d
->
foregroundColor
);
d
->
colorSelectorDialog
->
setPreviousColor
(
d
->
foregroundColor
);
//this should toggle, but I don't know how to implement that...
//this should toggle, but I don't know how to implement that...
d
->
colorSelectorDialog
->
show
();
d
->
colorSelectorDialog
->
show
();
...
@@ -367,7 +367,7 @@ void KoDualColorButton::mouseReleaseEvent( QMouseEvent *event )
...
@@ -367,7 +367,7 @@ void KoDualColorButton::mouseReleaseEvent( QMouseEvent *event )
}
else
if
(
backgroundRect
.
contains
(
event
->
pos
()
))
{
}
else
if
(
backgroundRect
.
contains
(
event
->
pos
()
))
{
if
(
d
->
tmpSelection
==
Background
)
{
if
(
d
->
tmpSelection
==
Background
)
{
if
(
d
->
popDialog
)
{
if
(
d
->
popDialog
)
{
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
KoColor
c
=
d
->
backgroundColor
;
KoColor
c
=
d
->
backgroundColor
;
c
=
KisDlgInternalColorSelector
::
getModalColorDialog
(
c
,
this
);
c
=
KisDlgInternalColorSelector
::
getModalColorDialog
(
c
,
this
);
d
->
backgroundColor
=
c
;
d
->
backgroundColor
=
c
;
...
...
libs/widgets/KoZoomInput.cpp
View file @
09b9cf99
...
@@ -44,7 +44,7 @@ class KoZoomInput::Private
...
@@ -44,7 +44,7 @@ class KoZoomInput::Private
KoZoomInput
::
KoZoomInput
(
QWidget
*
parent
)
KoZoomInput
::
KoZoomInput
(
QWidget
*
parent
)
:
QStackedWidget
(
parent
),
d
(
new
Private
)
:
QStackedWidget
(
parent
),
d
(
new
Private
)
{
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
setAttribute
(
Qt
::
WA_MacMiniSize
,
true
);
setAttribute
(
Qt
::
WA_MacMiniSize
,
true
);
#endif
#endif
...
...
libs/widgets/kis_color_button.cpp
View file @
09b9cf99
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
KoColor
col
;
KoColor
col
;
QPoint
mPos
;
QPoint
mPos
;
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
QPointer
<
KisDlgInternalColorSelector
>
dialogPtr
;
QPointer
<
KisDlgInternalColorSelector
>
dialogPtr
;
#else
#else
QPointer
<
QColorDialog
>
dialogPtr
;
QPointer
<
QColorDialog
>
dialogPtr
;
...
@@ -321,13 +321,13 @@ void KisColorButton::mouseMoveEvent(QMouseEvent *e)
...
@@ -321,13 +321,13 @@ void KisColorButton::mouseMoveEvent(QMouseEvent *e)
void
KisColorButton
::
KisColorButtonPrivate
::
_k_chooseColor
()
void
KisColorButton
::
KisColorButtonPrivate
::
_k_chooseColor
()
{
{
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
KisDlgInternalColorSelector
*
dialog
=
dialogPtr
.
data
();
KisDlgInternalColorSelector
*
dialog
=
dialogPtr
.
data
();
#else
#else
QColorDialog
*
dialog
=
dialogPtr
.
data
();
QColorDialog
*
dialog
=
dialogPtr
.
data
();
#endif
#endif
if
(
dialog
)
{
if
(
dialog
)
{
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
dialog
->
setPreviousColor
(
q
->
color
());
dialog
->
setPreviousColor
(
q
->
color
());
#else
#else
dialog
->
setCurrentColor
(
q
->
color
().
toQColor
());
dialog
->
setCurrentColor
(
q
->
color
().
toQColor
());
...
@@ -340,7 +340,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
...
@@ -340,7 +340,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
KisDlgInternalColorSelector
::
Config
cfg
;
KisDlgInternalColorSelector
::
Config
cfg
;
cfg
.
paletteBox
=
q
->
paletteViewEnabled
();
cfg
.
paletteBox
=
q
->
paletteViewEnabled
();
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
dialog
=
new
KisDlgInternalColorSelector
(
q
,
dialog
=
new
KisDlgInternalColorSelector
(
q
,
q
->
color
(),
q
->
color
(),
cfg
,
cfg
,
...
@@ -352,7 +352,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
...
@@ -352,7 +352,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
dialog
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
dialog
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
connect
(
dialog
,
SIGNAL
(
accepted
()),
q
,
SLOT
(
_k_colorChosen
()));
connect
(
dialog
,
SIGNAL
(
accepted
()),
q
,
SLOT
(
_k_colorChosen
()));
dialogPtr
=
dialog
;
dialogPtr
=
dialog
;
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
dialog
->
setPreviousColor
(
q
->
color
());
dialog
->
setPreviousColor
(
q
->
color
());
#else
#else
dialog
->
setCurrentColor
(
q
->
color
().
toQColor
());
dialog
->
setCurrentColor
(
q
->
color
().
toQColor
());
...
@@ -362,7 +362,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
...
@@ -362,7 +362,7 @@ void KisColorButton::KisColorButtonPrivate::_k_chooseColor()
void
KisColorButton
::
KisColorButtonPrivate
::
_k_colorChosen
()
void
KisColorButton
::
KisColorButtonPrivate
::
_k_colorChosen
()
{
{
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
KisDlgInternalColorSelector
*
dialog
=
dialogPtr
.
data
();
KisDlgInternalColorSelector
*
dialog
=
dialogPtr
.
data
();
#else
#else
QColorDialog
*
dialog
=
dialogPtr
.
data
();
QColorDialog
*
dialog
=
dialogPtr
.
data
();
...
@@ -370,7 +370,7 @@ void KisColorButton::KisColorButtonPrivate::_k_colorChosen()
...
@@ -370,7 +370,7 @@ void KisColorButton::KisColorButtonPrivate::_k_colorChosen()
if
(
!
dialog
)
{
if
(
!
dialog
)
{
return
;
return
;
}
}
#ifndef Q_OS_
OSX
#ifndef Q_OS_
MACOS
q
->
setColor
(
dialog
->
getCurrentColor
());
q
->
setColor
(
dialog
->
getCurrentColor
());
#else
#else
KoColor
c
;
KoColor
c
;
...
...
libs/widgetutils/KoFileDialog.cpp
View file @
09b9cf99
...
@@ -163,7 +163,7 @@ void KoFileDialog::createFileDialog()
...
@@ -163,7 +163,7 @@ void KoFileDialog::createFileDialog()
d
->
fileDialog
->
setOption
(
QFileDialog
::
DontConfirmOverwrite
,
false
);
d
->
fileDialog
->
setOption
(
QFileDialog
::
DontConfirmOverwrite
,
false
);
d
->
fileDialog
->
setOption
(
QFileDialog
::
HideNameFilterDetails
,
true
);
d
->
fileDialog
->
setOption
(
QFileDialog
::
HideNameFilterDetails
,
true
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
QList
<
QUrl
>
urls
=
d
->
fileDialog
->
sidebarUrls
();
QList
<
QUrl
>
urls
=
d
->
fileDialog
->
sidebarUrls
();
QUrl
volumes
=
QUrl
::
fromLocalFile
(
"/Volumes"
);
QUrl
volumes
=
QUrl
::
fromLocalFile
(
"/Volumes"
);
if
(
!
urls
.
contains
(
volumes
))
{
if
(
!
urls
.
contains
(
volumes
))
{
...
...
libs/widgetutils/KoResourcePaths.cpp
View file @
09b9cf99
...
@@ -79,14 +79,14 @@ static const Qt::CaseSensitivity cs = Qt::CaseInsensitive;
...
@@ -79,14 +79,14 @@ static const Qt::CaseSensitivity cs = Qt::CaseInsensitive;
static
const
Qt
::
CaseSensitivity
cs
=
Qt
::
CaseSensitive
;
static
const
Qt
::
CaseSensitivity
cs
=
Qt
::
CaseSensitive
;
#endif
#endif
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
#include <ApplicationServices/ApplicationServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <CoreServices/CoreServices.h>
#endif
#endif
QString
getInstallationPrefix
()
{
QString
getInstallationPrefix
()
{
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
QString
appPath
=
qApp
->
applicationDirPath
();
QString
appPath
=
qApp
->
applicationDirPath
();
dbgResources
<<
"1"
<<
appPath
;
dbgResources
<<
"1"
<<
appPath
;
...
@@ -408,7 +408,7 @@ QStringList KoResourcePaths::findDirsInternal(const QString &type)
...
@@ -408,7 +408,7 @@ QStringList KoResourcePaths::findDirsInternal(const QString &type)
QStandardPaths
::
locateAll
(
d
->
mapTypeToQStandardPaths
(
type
),
alias
+
'/'
,
QStandardPaths
::
LocateDirectory
);
QStandardPaths
::
locateAll
(
d
->
mapTypeToQStandardPaths
(
type
),
alias
+
'/'
,
QStandardPaths
::
LocateDirectory
);
appendResources
(
&
dirs
,
aliasDirs
,
true
);
appendResources
(
&
dirs
,
aliasDirs
,
true
);
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
dbgResources
<<
"MAC:"
<<
getApplicationRoot
();
dbgResources
<<
"MAC:"
<<
getApplicationRoot
();
QStringList
bundlePaths
;
QStringList
bundlePaths
;
bundlePaths
<<
getApplicationRoot
()
+
"/share/krita/"
+
alias
;
bundlePaths
<<
getApplicationRoot
()
+
"/share/krita/"
+
alias
;
...
...
libs/widgetutils/xmlgui/kkeysequencewidget.cpp
View file @
09b9cf99
...
@@ -572,7 +572,7 @@ void KKeySequenceWidgetPrivate::updateShortcutDisplay()
...
@@ -572,7 +572,7 @@ void KKeySequenceWidgetPrivate::updateShortcutDisplay()
if
(
modifierKeys
&
Qt
::
META
)
{
if
(
modifierKeys
&
Qt
::
META
)
{
s
+=
KKeyServer
::
modToStringUser
(
Qt
::
META
)
+
QLatin1Char
(
'+'
);
s
+=
KKeyServer
::
modToStringUser
(
Qt
::
META
)
+
QLatin1Char
(
'+'
);
}
}
#if defined(Q_OS_
OSX
)
#if defined(Q_OS_
MACOS
)
if
(
modifierKeys
&
Qt
::
ALT
)
{
if
(
modifierKeys
&
Qt
::
ALT
)
{
s
+=
KKeyServer
::
modToStringUser
(
Qt
::
ALT
)
+
QLatin1Char
(
'+'
);
s
+=
KKeyServer
::
modToStringUser
(
Qt
::
ALT
)
+
QLatin1Char
(
'+'
);
}
}
...
...
plugins/flake/textshape/TextTool.cpp
View file @
09b9cf99
...
@@ -1653,7 +1653,7 @@ void TextTool::keyPressEvent(QKeyEvent *event)
...
@@ -1653,7 +1653,7 @@ void TextTool::keyPressEvent(QKeyEvent *event)
}
else
if
(
hit
(
item
,
KStandardShortcut
::
ForwardWord
))
{
}
else
if
(
hit
(
item
,
KStandardShortcut
::
ForwardWord
))
{
moveOperation
=
QTextCursor
::
WordRight
;
moveOperation
=
QTextCursor
::
WordRight
;
}
}
#ifdef Q_OS_
OSX
#ifdef Q_OS_
MACOS
// Don't reject "alt" key, it may be used for typing text on Mac OS
// Don't reject "alt" key, it may be used for typing text on Mac OS
else
if
((
event
->
modifiers
()
&
Qt
::
ControlModifier
)
||
event
->
text
().
length
()
==
0
)
{
else
if
((
event
->
modifiers
()
&
Qt
::
ControlModifier
)
||
event
->
text
().
length
()
==
0
)
{
#else
#else
...
...