Skip to content

Commit 9031fe5

Browse files
committed
Fix Scintilla compilation errors for Qt6.9
1 parent bde90c0 commit 9031fe5

32 files changed

+49
-0
lines changed

scintilla/qt/ScintillaEdit/ScintillaDocument.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Wrapper for Scintilla document object so it can be manipulated independently.
33
// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
44

5+
#include <cstdint>
56
#include <stdexcept>
67
#include <string_view>
78
#include <vector>

scintilla/qt/ScintillaEdit/ScintillaEdit.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Extended version of ScintillaEditBase with a method for each API
33
// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
44

5+
#include <cstdint>
56
#include "ScintillaEdit.h"
67

78
using namespace Scintilla;

scintilla/qt/ScintillaEditBase/PlatQt.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Scintilla platform layer for Qt
1010

1111
#include <cstdio>
12+
#include <cstdint>
1213

1314
#include "PlatQt.h"
1415
#include "Scintilla.h"
@@ -1347,8 +1348,13 @@ void Platform::Assert(const char *c, const char *file, int line) noexcept
13471348
char buffer[2000];
13481349
snprintf(buffer, std::size(buffer), "Assertion [%s] failed at %s %d", c, file, line);
13491350
if (Platform::ShowAssertionPopUps(false)) {
1351+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
1352+
QMessageBox mb(QMessageBox::NoIcon, "Assertion Failure", buffer,
1353+
QMessageBox::Ok);
1354+
#else
13501355
QMessageBox mb("Assertion Failure", buffer, QMessageBox::NoIcon,
13511356
QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
1357+
#endif
13521358
mb.exec();
13531359
} else {
13541360
strcat(buffer, "\n");

scintilla/qt/ScintillaEditBase/ScintillaEditBase.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
99
// @file ScintillaEditBase.cpp - Qt widget that wraps ScintillaQt and provides events and scrolling
1010

11+
#include <cstdint>
1112
#include "ScintillaEditBase.h"
1213
#include "ScintillaQt.h"
1314
#include "PlatQt.h"
@@ -383,7 +384,11 @@ void ScintillaEditBase::dragEnterEvent(QDragEnterEvent *event)
383384
} else if (event->mimeData()->hasText()) {
384385
event->acceptProposedAction();
385386

387+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
386388
Point point = PointFromQPoint(event->pos());
389+
#else
390+
Point point = PointFromQPoint(event->position().toPoint());
391+
#endif
387392
sqt->DragEnter(point);
388393
} else {
389394
event->ignore();
@@ -402,7 +407,11 @@ void ScintillaEditBase::dragMoveEvent(QDragMoveEvent *event)
402407
} else if (event->mimeData()->hasText()) {
403408
event->acceptProposedAction();
404409

410+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
405411
Point point = PointFromQPoint(event->pos());
412+
#else
413+
Point point = PointFromQPoint(event->position().toPoint());
414+
#endif
406415
sqt->DragMove(point);
407416
} else {
408417
event->ignore();
@@ -417,7 +426,11 @@ void ScintillaEditBase::dropEvent(QDropEvent *event)
417426
} else if (event->mimeData()->hasText()) {
418427
event->acceptProposedAction();
419428

429+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
420430
Point point = PointFromQPoint(event->pos());
431+
#else
432+
Point point = PointFromQPoint(event->position().toPoint());
433+
#endif
421434
bool move = (event->source() == this &&
422435
event->proposedAction() == Qt::MoveAction);
423436
sqt->Drop(point, event->mimeData(), move);

scintilla/qt/ScintillaEditBase/ScintillaQt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
99
// @file ScintillaQt.cpp - Qt specific subclass of ScintillaBase
1010

11+
#include <cstdint>
1112
#include "ScintillaQt.h"
1213
#include "PlatQt.h"
1314

scintilla/src/AutoComplete.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <cassert>
1111
#include <cstring>
1212
#include <cstdio>
13+
#include <cstdint>
1314

1415
#include <stdexcept>
1516
#include <string>

scintilla/src/CallTip.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <cstring>
1212
#include <cstdio>
1313
#include <cmath>
14+
#include <cstdint>
1415

1516
#include <stdexcept>
1617
#include <string>

scintilla/src/CaseConvert.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <cassert>
1212
#include <cstring>
13+
#include <cstdint>
1314

1415
#include <stdexcept>
1516
#include <string>

scintilla/src/CaseFolder.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <stdexcept>
99
#include <vector>
1010
#include <algorithm>
11+
#include <cstdint>
1112

1213
#include "CharacterType.h"
1314
#include "CaseFolder.h"

scintilla/src/CellBuffer.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <cstdio>
1313
#include <cstdarg>
1414
#include <climits>
15+
#include <cstdint>
1516

1617
#include <stdexcept>
1718
#include <string>

0 commit comments

Comments
 (0)