File tree Expand file tree Collapse file tree 6 files changed +22
-14
lines changed Expand file tree Collapse file tree 6 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,14 @@ AC_REQUIRE([AC_SYS_LARGEFILE])
101
101
102
102
if test "x$GCC" = "xyes"; then
103
103
CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
104
- if test "x$HAVE_DARWIN" = "xyes"; then
105
- CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
106
- LDFLAGS="$LDFLAGS"
107
- else
108
- CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
104
+ CXXFLAGS="$CXXFLAGS -ffast-math -Wall -pipe"
105
+
106
+ # use C++17 if possible (Qt 6 requires it)
107
+ AUD_CHECK_CXXFLAGS(-std=gnu++17)
108
+ if [ "${CFLAGS#gnu++17}" = "$CFLAGS" ] ; then
109
+ CFLAGS="$CFLAGS -std=gnu++11"
109
110
fi
111
+
110
112
AUD_CHECK_CFLAGS(-Wtype-limits)
111
113
AUD_CHECK_CFLAGS(-Wno-stringop-truncation)
112
114
AUD_CHECK_CXXFLAGS(-Woverloaded-virtual)
Original file line number Diff line number Diff line change 60
60
61
61
#include < stdlib.h>
62
62
63
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
64
+ typedef qintptr filter_result_t ;
65
+ #else
66
+ typedef long filter_result_t ;
67
+ #endif
68
+
63
69
namespace GlobalHotkeys
64
70
{
65
71
@@ -81,7 +87,7 @@ class GlobalHotkeysEventFilter : public QAbstractNativeEventFilter
81
87
{
82
88
private:
83
89
bool nativeEventFilter (const QByteArray & eventType, void * message,
84
- long * result) override ;
90
+ filter_result_t * result) override ;
85
91
};
86
92
87
93
/* global vars */
@@ -454,7 +460,8 @@ void GlobalHotkeys::cleanup()
454
460
}
455
461
456
462
bool GlobalHotkeysEventFilter::nativeEventFilter (const QByteArray & eventType,
457
- void * message, long * result)
463
+ void * message,
464
+ filter_result_t * result)
458
465
{
459
466
Q_UNUSED (eventType);
460
467
Q_UNUSED (result);
Original file line number Diff line number Diff line change @@ -77,9 +77,11 @@ QVariant PlaylistModel::alignment(int col) const
77
77
case NowPlaying:
78
78
return Qt::AlignCenter;
79
79
case Length:
80
- return Qt::AlignRight + Qt::AlignVCenter;
80
+ return static_cast <Qt::Alignment::Int>(Qt::AlignRight |
81
+ Qt::AlignVCenter);
81
82
default :
82
- return Qt::AlignLeft + Qt::AlignVCenter;
83
+ return static_cast <Qt::Alignment::Int>(Qt::AlignLeft |
84
+ Qt::AlignVCenter);
83
85
}
84
86
}
85
87
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ bool PlaylistTabBar::cancelRename()
293
293
294
294
void PlaylistTabBar::mousePressEvent (QMouseEvent * e)
295
295
{
296
- if (e->button () == Qt::MidButton )
296
+ if (e->button () == Qt::MiddleButton )
297
297
{
298
298
int index = tabAt (e->pos ());
299
299
if (index >= 0 )
Original file line number Diff line number Diff line change 23
23
#include < libaudcore/i18n.h>
24
24
#include < libaudcore/preferences.h>
25
25
26
- #include < QApplication>
27
- #include < QDesktopWidget>
28
-
29
26
const char * const qtui_defaults[] = {
30
27
// clang-format off
31
28
" infoarea_show_vis" , " TRUE" ,
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ void TextBox::render_bitmap (const char * text)
164
164
165
165
auto ucs4 = QString (text).toUcs4 ();
166
166
167
- m_buf_width = aud::max (cw * ucs4.length (), m_width);
167
+ m_buf_width = aud::max (cw * ( int ) ucs4.length (), m_width);
168
168
m_buf.capture (new QImage (m_buf_width * config.scale , ch * config.scale ,
169
169
QImage::Format_RGB32));
170
170
You can’t perform that action at this time.
0 commit comments