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
@ -209,6 +209,9 @@ namespace QtCurve
|
||||
// force update
|
||||
if( widget->isVisible() )
|
||||
{ widget->update(); }
|
||||
|
||||
#else
|
||||
Q_UNUSED(widget);
|
||||
|
||||
#endif
|
||||
|
||||
@ -220,6 +223,8 @@ namespace QtCurve
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
XChangeProperty( QX11Info::display(), widget->winId(), _atom, XA_CARDINAL, 32, PropModeReplace, 0, 0 );
|
||||
#else
|
||||
Q_UNUSED(widget);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -731,6 +731,7 @@ inline int numButtons(EScrollbar type)
|
||||
case SCROLLBAR_NONE:
|
||||
return 0;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
static inline void drawRect(QPainter *p, const QRect &r)
|
||||
@ -963,7 +964,7 @@ Style::Style()
|
||||
itsAnimateStep(0),
|
||||
itsTitlebarHeight(0),
|
||||
calibre_icon_map(QHash<int,QString>()),
|
||||
is_kde_session(False),
|
||||
is_kde_session(0),
|
||||
itsPos(-1, -1),
|
||||
itsHoverWidget(0L),
|
||||
#ifdef Q_WS_X11
|
||||
@ -978,7 +979,9 @@ Style::Style()
|
||||
, itsName(name)
|
||||
#endif
|
||||
{
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
is_kde_session = (getenv("KDE_FULL_SESSION") != NULL);
|
||||
#endif
|
||||
const char *env=getenv(QTCURVE_PREVIEW_CONFIG);
|
||||
if(env && 0==strcmp(env, QTCURVE_PREVIEW_CONFIG))
|
||||
{
|
||||
|
@ -74,6 +74,7 @@ namespace QtCurve
|
||||
else
|
||||
return false;
|
||||
#else
|
||||
Q_UNUSED(widget);
|
||||
return compositingActive();
|
||||
#endif
|
||||
}
|
||||
|
@ -680,6 +680,8 @@ namespace QtCurve
|
||||
NETRootInfo rootInfo(QX11Info::display(), NET::WMMoveResize);
|
||||
rootInfo.moveResizeRequest( widget->window()->winId(), position.x(), position.y(), NET::Move);
|
||||
#endif // QTC_QT_ONLY
|
||||
#else
|
||||
Q_UNUSED(position);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user