mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Calibre style: Fix various compiler warnings on non X11 platforms
This commit is contained in:
parent
d96a4cf700
commit
7f321ef0d9
@ -210,6 +210,9 @@ namespace QtCurve
|
|||||||
if( widget->isVisible() )
|
if( widget->isVisible() )
|
||||||
{ widget->update(); }
|
{ widget->update(); }
|
||||||
|
|
||||||
|
#else
|
||||||
|
Q_UNUSED(widget);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -220,6 +223,8 @@ namespace QtCurve
|
|||||||
{
|
{
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
XChangeProperty( QX11Info::display(), widget->winId(), _atom, XA_CARDINAL, 32, PropModeReplace, 0, 0 );
|
XChangeProperty( QX11Info::display(), widget->winId(), _atom, XA_CARDINAL, 32, PropModeReplace, 0, 0 );
|
||||||
|
#else
|
||||||
|
Q_UNUSED(widget);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -731,6 +731,7 @@ inline int numButtons(EScrollbar type)
|
|||||||
case SCROLLBAR_NONE:
|
case SCROLLBAR_NONE:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void drawRect(QPainter *p, const QRect &r)
|
static inline void drawRect(QPainter *p, const QRect &r)
|
||||||
@ -963,7 +964,7 @@ Style::Style()
|
|||||||
itsAnimateStep(0),
|
itsAnimateStep(0),
|
||||||
itsTitlebarHeight(0),
|
itsTitlebarHeight(0),
|
||||||
calibre_icon_map(QHash<int,QString>()),
|
calibre_icon_map(QHash<int,QString>()),
|
||||||
is_kde_session(False),
|
is_kde_session(0),
|
||||||
itsPos(-1, -1),
|
itsPos(-1, -1),
|
||||||
itsHoverWidget(0L),
|
itsHoverWidget(0L),
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
@ -978,7 +979,9 @@ Style::Style()
|
|||||||
, itsName(name)
|
, itsName(name)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
is_kde_session = (getenv("KDE_FULL_SESSION") != NULL);
|
is_kde_session = (getenv("KDE_FULL_SESSION") != NULL);
|
||||||
|
#endif
|
||||||
const char *env=getenv(QTCURVE_PREVIEW_CONFIG);
|
const char *env=getenv(QTCURVE_PREVIEW_CONFIG);
|
||||||
if(env && 0==strcmp(env, QTCURVE_PREVIEW_CONFIG))
|
if(env && 0==strcmp(env, QTCURVE_PREVIEW_CONFIG))
|
||||||
{
|
{
|
||||||
|
@ -74,6 +74,7 @@ namespace QtCurve
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
|
Q_UNUSED(widget);
|
||||||
return compositingActive();
|
return compositingActive();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -680,6 +680,8 @@ namespace QtCurve
|
|||||||
NETRootInfo rootInfo(QX11Info::display(), NET::WMMoveResize);
|
NETRootInfo rootInfo(QX11Info::display(), NET::WMMoveResize);
|
||||||
rootInfo.moveResizeRequest( widget->window()->winId(), position.x(), position.y(), NET::Move);
|
rootInfo.moveResizeRequest( widget->window()->winId(), position.x(), position.y(), NET::Move);
|
||||||
#endif // QTC_QT_ONLY
|
#endif // QTC_QT_ONLY
|
||||||
|
#else
|
||||||
|
Q_UNUSED(position);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user