Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb1a149441 | |||
| 37b6343506 |
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(BareCode
|
||||
VERSION 1.3.0
|
||||
VERSION 1.3.2
|
||||
DESCRIPTION "A modular code editor built with Qt6"
|
||||
LANGUAGES CXX
|
||||
)
|
||||
@@ -35,7 +35,7 @@ endif()
|
||||
# ---------------------------------------------------------------------------
|
||||
# Qt6
|
||||
# ---------------------------------------------------------------------------
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Concurrent)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Concurrent LinguistTools)
|
||||
qt_standard_project_setup()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
@@ -43,12 +43,15 @@ add_subdirectory(src)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Übersetzungen — lrelease → .qm → ins Build-Verzeichnis
|
||||
#
|
||||
# Qt6::lrelease kommt aus der Komponente "LinguistTools" (siehe find_package
|
||||
# oben) und funktioniert plattformunabhängig, unabhängig davon, wo lrelease
|
||||
# tatsächlich installiert ist. Ein manuelles find_program() mit fest
|
||||
# verdrahteten Pfaden ist NICHT portabel: einige Distributionen installieren
|
||||
# Qt6 nicht unter /usr, sondern in einen eigenen Unterbaum (z. B. Void Linux
|
||||
# unter /usr/lib/qt6/...), wodurch ein relativer Pfad wie
|
||||
# "${Qt6_DIR}/../../../bin" ins Leere zeigt.
|
||||
# ---------------------------------------------------------------------------
|
||||
find_program(LRELEASE_EXECUTABLE
|
||||
NAMES lrelease lrelease-qt6
|
||||
HINTS "${Qt6_DIR}/../../../bin"
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
set(TS_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/translations/barecode_de.ts
|
||||
@@ -63,7 +66,7 @@ foreach(TS_FILE ${TS_FILES})
|
||||
OUTPUT "${QM_FILE}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/translations"
|
||||
COMMAND ${LRELEASE_EXECUTABLE} "${TS_FILE}" -qm "${QM_FILE}"
|
||||
COMMAND Qt6::lrelease "${TS_FILE}" -qm "${QM_FILE}"
|
||||
DEPENDS "${TS_FILE}"
|
||||
COMMENT "lrelease: ${TS_NAME}.qm"
|
||||
VERBATIM
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BareCode
|
||||
|
||||
**Schlanker, modularer Code-Editor für Web-Entwickler**
|
||||
Version 1.3.0 — von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de) | [Discord](https://discord.projekt-hirnfrei.de)
|
||||
Version 1.3.2 — von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de) | [Discord](https://discord.projekt-hirnfrei.de)
|
||||
|
||||
Entwickelt mit **C++17**, **Qt6** und **CMake**.
|
||||
Kompiliert auf **Linux**, **Windows** und **Haiku**.
|
||||
|
||||
2
main.cpp
2
main.cpp
@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
|
||||
QApplication app(argc, argv);
|
||||
|
||||
app.setApplicationName("BareCode");
|
||||
app.setApplicationVersion("1.3.0");
|
||||
app.setApplicationVersion("1.3.2");
|
||||
app.setOrganizationName("BareCode");
|
||||
|
||||
// Icon
|
||||
|
||||
@@ -74,7 +74,7 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
info->addLayout(row);
|
||||
};
|
||||
|
||||
makeRow(tr("Version"), "1.3.0");
|
||||
makeRow(tr("Version"), "1.3.2");
|
||||
makeRow(tr("Entwickler"), "Dany Thinnes");
|
||||
makeRow(tr("Projekt"), "Projekt Hirnfrei");
|
||||
makeRow(tr("Framework"), QString("Qt %1").arg(qVersion()));
|
||||
|
||||
@@ -563,6 +563,16 @@ void CodeEditor::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
const int tabSize = m_settings->tabSize();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Escape: Signatur-Tooltip sofort schließen (unabhängig vom Cursor-
|
||||
// Kontext). Das Variablen-Popup behandelt Escape bereits selbst weiter
|
||||
// unten in m_varCompleter->handleKeyPress().
|
||||
// -----------------------------------------------------------------------
|
||||
if (event->key() == Qt::Key_Escape)
|
||||
{
|
||||
m_signatureHelper->dismiss();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Shift+Tab: Einrückung zurückziehen
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -758,5 +768,6 @@ void CodeEditor::focusOutEvent(QFocusEvent *event)
|
||||
{
|
||||
QPlainTextEdit::focusOutEvent(event);
|
||||
m_varCompleter->notifyFocusLost();
|
||||
m_signatureHelper->notifyFocusLost();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,23 @@ void SignatureHelper::loadDatabase()
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Editor hat den Fokus verloren — Tooltip schließen, damit es nicht
|
||||
// als verwaistes Fenster über allen Workspaces stehen bleibt.
|
||||
// ---------------------------------------------------------------------------
|
||||
void SignatureHelper::notifyFocusLost()
|
||||
{
|
||||
m_tooltip->hide();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Tooltip sofort schließen (z. B. per Escape)
|
||||
// ---------------------------------------------------------------------------
|
||||
void SignatureHelper::dismiss()
|
||||
{
|
||||
m_tooltip->hide();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Cursor-Bewegung auswerten
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -24,6 +24,17 @@ class SignatureHelper : public QObject
|
||||
public:
|
||||
explicit SignatureHelper(CodeEditor *editor);
|
||||
|
||||
// Muss aufgerufen werden, wenn der Editor den Fokus verliert
|
||||
// (z. B. beim Tab-Wechsel oder wenn eine andere Anwendung/ein anderer
|
||||
// Workspace aktiviert wird) — schließt ein evtl. offenes Tooltip.
|
||||
// Ohne diesen Hook kann das Tooltip als "Geisterfenster" über allen
|
||||
// Workspaces stehen bleiben, siehe Bugreport.
|
||||
void notifyFocusLost();
|
||||
|
||||
// Schließt das Tooltip sofort, unabhängig vom Cursor-Kontext.
|
||||
// Wird u.a. bei Escape aufgerufen.
|
||||
void dismiss();
|
||||
|
||||
private slots:
|
||||
void onCursorPositionChanged();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user