2.26 cleanup

This commit is contained in:
Roy Qu 2023-10-20 11:17:46 +08:00
parent 7b949d8d23
commit 9b1b81e368
3 changed files with 23 additions and 17 deletions

View File

@ -9,13 +9,12 @@ CONFIG += nokey
# uncomment the following line to enable sdcc support # uncomment the following line to enable sdcc support
CONFIG += ENABLE_SDCC CONFIG += ENABLE_SDCC
isEmpty(APP_NAME) {
APP_NAME = RedPandaCPP
}
isEmpty(APP_VERSION) { APP_NAME = RedPandaCPP
APP_VERSION = 2.25
} APP_VERSION = 2.26
TEST_VERSION = alpha1
contains(QMAKE_HOST.arch, x86_64):{ contains(QMAKE_HOST.arch, x86_64):{
DEFINES += ARCH_X86_64=1 DEFINES += ARCH_X86_64=1
@ -52,7 +51,11 @@ DEFINES += _WIN32_WINNT=0x0601
DEFINES += PREFIX=\\\"$${PREFIX}\\\" DEFINES += PREFIX=\\\"$${PREFIX}\\\"
DEFINES += LIBEXECDIR=\\\"$${LIBEXECDIR}\\\" DEFINES += LIBEXECDIR=\\\"$${LIBEXECDIR}\\\"
DEFINES += APP_NAME=\\\"$${APP_NAME}\\\" DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}\\\" isEmpty(TEST_VERSION) {
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}\\\"
} else {
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}-$${TEST_VERSION}\\\"
}
gcc { gcc {
QMAKE_CXXFLAGS_RELEASE += -Werror=return-type QMAKE_CXXFLAGS_RELEASE += -Werror=return-type

View File

@ -708,11 +708,18 @@ void Editor::keyPressEvent(QKeyEvent *event)
}); });
if (event->modifiers() == Qt::ControlModifier if (event->modifiers() == Qt::ControlModifier
&& event->key() == Qt::Key_Control && event->key() == Qt::Key_Control
&& !pMainWindow->completionPopup()->isVisible() && !mCompletionPopup->isVisible()
&& !pMainWindow->headerCompletionPopup()->isVisible() && !mHeaderCompletionPopup->isVisible()
) { ) {
setMouseTracking(true); setMouseTracking(true);
handled=true; handled=true;
QMouseEvent mouseEvent{
QEvent::MouseMove,
mapFromGlobal(QCursor::pos()),
Qt::NoButton,
Qt::NoButton,
Qt::ControlModifier};
mouseMoveEvent( &mouseEvent );
return; return;
} }
if (readOnly()) if (readOnly())
@ -1337,9 +1344,9 @@ bool Editor::event(QEvent *event)
if ((event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove) if ((event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove)
&& qApp->mouseButtons() == Qt::NoButton && qApp->mouseButtons() == Qt::NoButton
&& pSettings->editor().enableTooltips() && pSettings->editor().enableTooltips()
&& !pMainWindow->completionPopup()->isVisible() && !mCompletionPopup->isVisible()
&& !pMainWindow->functionTip()->isVisible() && !pMainWindow->functionTip()->isVisible()
&& !pMainWindow->headerCompletionPopup()->isVisible()) { && !mHeaderCompletionPopup->isVisible()) {
cancelHint(); cancelHint();
mTooltipTimer.stop(); mTooltipTimer.stop();
if (pSettings->editor().tipsDelay()>0) { if (pSettings->editor().tipsDelay()>0) {
@ -1393,7 +1400,7 @@ void Editor::inputMethodEvent(QInputMethodEvent *event)
QString s = event->commitString(); QString s = event->commitString();
if (s.isEmpty()) if (s.isEmpty())
return; return;
if (pMainWindow->completionPopup()->isVisible()) { if (mCompletionPopup->isVisible()) {
onCompletionInputMethod(event); onCompletionInputMethod(event);
return; return;
} else { } else {
@ -4152,7 +4159,7 @@ QString Editor::getHintForFunction(const PStatement &statement, const QString& f
void Editor::updateFunctionTip(bool showTip) void Editor::updateFunctionTip(bool showTip)
{ {
if (pMainWindow->completionPopup()->isVisible()) { if (mCompletionPopup->isVisible()) {
pMainWindow->functionTip()->hide(); pMainWindow->functionTip()->hide();
return; return;
} }

View File

@ -12,10 +12,6 @@ consolepauser.subdir = tools/consolepauser
redpanda_qt_utils.subdir = libs/redpanda_qt_utils redpanda_qt_utils.subdir = libs/redpanda_qt_utils
qsynedit.subdir = libs/qsynedit qsynedit.subdir = libs/qsynedit
APP_NAME = RedPandaCPP
APP_VERSION = 2.25
# Add the dependencies so that the RedPandaIDE project can add the depended programs # Add the dependencies so that the RedPandaIDE project can add the depended programs
# into the main app bundle # into the main app bundle
RedPandaIDE.depends = astyle consolepauser qsynedit RedPandaIDE.depends = astyle consolepauser qsynedit