Compare commits
65 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
eb44ce7fc0 | |
|
|
04e53350eb | |
|
|
9c43c39bd8 | |
|
|
08f999be68 | |
|
|
85340462ab | |
|
|
a99a7ca49e | |
|
|
607d8a2b71 | |
|
|
2d85f0b558 | |
|
|
218c09f2ec | |
|
|
fb548f310e | |
|
|
b66db44449 | |
|
|
c023178ec3 | |
|
|
82792f47b6 | |
|
|
1ff25476a5 | |
|
|
71c3a56914 | |
|
|
a9e0ba8ead | |
|
|
c3a0e2b3b7 | |
|
|
92c1168624 | |
|
|
8d33848878 | |
|
|
27551a0e5a | |
|
|
6f7e93b2e3 | |
|
|
787c142436 | |
|
|
51f61d06cb | |
|
|
bac15c260b | |
|
|
0938a54f88 | |
|
|
2024cced33 | |
|
|
26d47a2636 | |
|
|
f9161e9425 | |
|
|
25917acc6c | |
|
|
089fddabab | |
|
|
3e97e943d3 | |
|
|
37eb3b8d74 | |
|
|
680351c70c | |
|
|
be582efc69 | |
|
|
31f57702e5 | |
|
|
60a3a4157b | |
|
|
a814f86a84 | |
|
|
54979d9a7f | |
|
|
11e421cba2 | |
|
|
5dbff524b0 | |
|
|
09ad0ec45d | |
|
|
e0216424cd | |
|
|
597353b43a | |
|
|
c7cab35b40 | |
|
|
c1d043ed9e | |
|
|
7e78363d6c | |
|
|
141af362b1 | |
|
|
ae9ddf99a5 | |
|
|
d9c74dca9d | |
|
|
a7f82a6518 | |
|
|
e0f985f1b7 | |
|
|
10fd01966a | |
|
|
2feb7db0c6 | |
|
|
5f32126f95 | |
|
|
bf834c0bc6 | |
|
|
2e7cbb6bf5 | |
|
|
dd9a1ea2a9 | |
|
|
f9cae7726a | |
|
|
f494b5a774 | |
|
|
1cbf1af88c | |
|
|
b17e425e2c | |
|
|
c6664013c0 | |
|
|
4b5fd4acb7 | |
|
|
a5da4015c7 | |
|
|
c53ee8381d |
|
|
@ -74,3 +74,6 @@ doc/html/*
|
|||
# union code gen
|
||||
.unioncode
|
||||
*.unioncode
|
||||
.cursor/
|
||||
.cursorindexingignore
|
||||
.specstory/
|
||||
|
|
|
|||
|
|
@ -89,11 +89,6 @@ Files: 3rdparty/cppdap/src/*
|
|||
Copyright: 2019 Google LLC
|
||||
License: Apache-2.0
|
||||
|
||||
# googletest
|
||||
Files: 3rdparty/cppdap/third_party/googletest/*
|
||||
Copyright: 2019 Google LLC
|
||||
License: BSD-3-Clause
|
||||
|
||||
# nolhmann
|
||||
Files: 3rdparty/cppdap/third_party/json/*
|
||||
Copyright: 2019 Google LLC
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
add_subdirectory(cppdap)
|
||||
add_subdirectory(unioncode-GitQlient)
|
||||
add_subdirectory(unioncode-qscintilla214)
|
||||
if (QT_VERSION_MAJOR MATCHES 5)
|
||||
add_subdirectory(unioncode-GitQlient)
|
||||
endif()
|
||||
add_subdirectory(unioncode-qtermwidget-0.14.1)
|
||||
add_subdirectory(unioncode-jsonrpccpp)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#ifdef ENABLE_LOG
|
||||
#define Log(message) printf("%s", message);
|
||||
|
|
@ -418,7 +419,9 @@ class Impl : public dap::Session {
|
|||
// "body" is an optional field for some events, such as "Terminated Event".
|
||||
bool body_ok = true;
|
||||
d->field("body", [&](dap::Deserializer* d) {
|
||||
if (!typeinfo->deserialize(d, data)) {
|
||||
// todo: to completed
|
||||
std::set<std::string> bodyCanBeEmpty { "terminated" };
|
||||
if (!typeinfo->deserialize(d, data) && bodyCanBeEmpty.find(event) == bodyCanBeEmpty.end()) {
|
||||
body_ok = false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ QString Diff::strOperation(Operation op) {
|
|||
QString Diff::toString() const {
|
||||
QString prettyText = text;
|
||||
// Replace linebreaks with Pilcrow signs.
|
||||
prettyText.replace('\n', L'\u00b6');
|
||||
prettyText.replace('\n', QChar(L'\u00b6'));
|
||||
return QString("Diff(") + strOperation(operation) + QString(",\"")
|
||||
+ prettyText + QString("\")");
|
||||
}
|
||||
|
|
@ -954,8 +954,8 @@ int diff_match_patch::diff_cleanupSemanticScore(const QString &one,
|
|||
bool whitespace2 = nonAlphaNumeric2 && char2.isSpace();
|
||||
bool lineBreak1 = whitespace1 && char1.category() == QChar::Other_Control;
|
||||
bool lineBreak2 = whitespace2 && char2.category() == QChar::Other_Control;
|
||||
bool blankLine1 = lineBreak1 && BLANKLINEEND.indexIn(one) != -1;
|
||||
bool blankLine2 = lineBreak2 && BLANKLINESTART.indexIn(two) != -1;
|
||||
bool blankLine1 = lineBreak1 && BLANKLINEEND.match(one).hasMatch();
|
||||
bool blankLine2 = lineBreak2 && BLANKLINESTART.match(two).hasMatch();
|
||||
|
||||
if (blankLine1 || blankLine2) {
|
||||
// Five points for blank lines.
|
||||
|
|
@ -978,8 +978,8 @@ int diff_match_patch::diff_cleanupSemanticScore(const QString &one,
|
|||
|
||||
|
||||
// Define some regex patterns for matching boundaries.
|
||||
QRegExp diff_match_patch::BLANKLINEEND = QRegExp("\\n\\r?\\n$");
|
||||
QRegExp diff_match_patch::BLANKLINESTART = QRegExp("^\\r?\\n\\r?\\n");
|
||||
QRegularExpression diff_match_patch::BLANKLINEEND = QRegularExpression("\\n\\r?\\n$");
|
||||
QRegularExpression diff_match_patch::BLANKLINESTART = QRegularExpression("^\\r?\\n\\r?\\n");
|
||||
|
||||
|
||||
void diff_match_patch::diff_cleanupEfficiency(QList<Diff> &diffs) {
|
||||
|
|
@ -1429,7 +1429,7 @@ int diff_match_patch::match_main(const QString &text, const QString &pattern,
|
|||
throw "Null inputs. (match_main)";
|
||||
}
|
||||
|
||||
loc = std::max(0, std::min(loc, text.length()));
|
||||
loc = std::max(0, std::min(loc, int(text.length())));
|
||||
if (text == pattern) {
|
||||
// Shortcut (potentially not guaranteed by the algorithm)
|
||||
return 0;
|
||||
|
|
@ -1497,7 +1497,7 @@ int diff_match_patch::match_bitap(const QString &text, const QString &pattern,
|
|||
// Use the result from this iteration as the maximum for the next.
|
||||
bin_max = bin_mid;
|
||||
int start = std::max(1, loc - bin_mid + 1);
|
||||
int finish = std::min(loc + bin_mid, text.length()) + pattern.length();
|
||||
int finish = std::min(loc + bin_mid, int(text.length()) + int(pattern.length()));
|
||||
|
||||
rd = new int[finish + 2];
|
||||
rd[finish + 1] = (1 << d) - 1;
|
||||
|
|
@ -1592,7 +1592,7 @@ void diff_match_patch::patch_addContext(Patch &patch, const QString &text) {
|
|||
&& pattern.length() < Match_MaxBits - Patch_Margin - Patch_Margin) {
|
||||
padding += Patch_Margin;
|
||||
pattern = safeMid(text, std::max(0, patch.start2 - padding),
|
||||
std::min(text.length(), patch.start2 + patch.length1 + padding)
|
||||
std::min(int(text.length()), patch.start2 + patch.length1 + padding)
|
||||
- std::max(0, patch.start2 - padding));
|
||||
}
|
||||
// Add one chunk for good luck.
|
||||
|
|
@ -1606,7 +1606,7 @@ void diff_match_patch::patch_addContext(Patch &patch, const QString &text) {
|
|||
}
|
||||
// Add the suffix.
|
||||
QString suffix = safeMid(text, patch.start2 + patch.length1,
|
||||
std::min(text.length(), patch.start2 + patch.length1 + padding)
|
||||
std::min(int(text.length()), patch.start2 + patch.length1 + padding)
|
||||
- (patch.start2 + patch.length1));
|
||||
if (!suffix.isEmpty()) {
|
||||
patch.diffs.append(Diff(EQUAL, suffix));
|
||||
|
|
@ -1974,7 +1974,7 @@ void diff_match_patch::patch_splitMax(QList<Patch> &patches) {
|
|||
bigpatch.diffs.removeFirst();
|
||||
} else {
|
||||
// Deletion or equality. Only take as much as we can stomach.
|
||||
diff_text = diff_text.left(std::min(diff_text.length(),
|
||||
diff_text = diff_text.left(std::min(int(diff_text.length()),
|
||||
patch_size - patch.length1 - Patch_Margin));
|
||||
patch.length1 += diff_text.length();
|
||||
start1 += diff_text.length();
|
||||
|
|
@ -2035,37 +2035,42 @@ QList<Patch> diff_match_patch::patch_fromText(const QString &textline) {
|
|||
if (textline.isEmpty()) {
|
||||
return patches;
|
||||
}
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
QStringList text = textline.split("\n", QString::SkipEmptyParts);
|
||||
#else
|
||||
QStringList text = textline.split("\n", Qt::SkipEmptyParts);
|
||||
#endif
|
||||
Patch patch;
|
||||
QRegExp patchHeader("^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$");
|
||||
QRegularExpression patchHeader("^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$");
|
||||
char sign;
|
||||
QString line;
|
||||
while (!text.isEmpty()) {
|
||||
if (!patchHeader.exactMatch(text.front())) {
|
||||
auto match = patchHeader.match(text.front());
|
||||
if (!match.hasMatch()) {
|
||||
throw QString("Invalid patch string: %1").arg(text.front());
|
||||
}
|
||||
|
||||
patch = Patch();
|
||||
patch.start1 = patchHeader.cap(1).toInt();
|
||||
if (patchHeader.cap(2).isEmpty()) {
|
||||
patch.start1 = match.captured(1).toInt();
|
||||
if (match.captured(2).isEmpty()) {
|
||||
patch.start1--;
|
||||
patch.length1 = 1;
|
||||
} else if (patchHeader.cap(2) == "0") {
|
||||
} else if (match.captured(2) == "0") {
|
||||
patch.length1 = 0;
|
||||
} else {
|
||||
patch.start1--;
|
||||
patch.length1 = patchHeader.cap(2).toInt();
|
||||
patch.length1 = match.captured(2).toInt();
|
||||
}
|
||||
|
||||
patch.start2 = patchHeader.cap(3).toInt();
|
||||
if (patchHeader.cap(4).isEmpty()) {
|
||||
patch.start2 = match.captured(3).toInt();
|
||||
if (match.captured(4).isEmpty()) {
|
||||
patch.start2--;
|
||||
patch.length2 = 1;
|
||||
} else if (patchHeader.cap(4) == "0") {
|
||||
} else if (match.captured(4) == "0") {
|
||||
patch.length2 = 0;
|
||||
} else {
|
||||
patch.start2--;
|
||||
patch.length2 = patchHeader.cap(4).toInt();
|
||||
patch.length2 = match.captured(4).toInt();
|
||||
}
|
||||
text.removeFirst();
|
||||
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ public:
|
|||
|
||||
private:
|
||||
// Define some regex patterns for matching boundaries.
|
||||
static QRegExp BLANKLINEEND;
|
||||
static QRegExp BLANKLINESTART;
|
||||
static QRegularExpression BLANKLINEEND;
|
||||
static QRegularExpression BLANKLINESTART;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -8,12 +8,11 @@ set(CMAKE_AUTORCC ON)
|
|||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS
|
||||
Widgets
|
||||
PrintSupport
|
||||
REQUIRED)
|
||||
find_package(Dtk COMPONENTS Widget REQUIRED)
|
||||
find_package(Dtk${DTK_VERSION_MAJOR} COMPONENTS Widget REQUIRED)
|
||||
|
||||
file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
|
||||
|
|
@ -40,9 +39,9 @@ target_include_directories(${PROJECT_NAME}
|
|||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
Qt5::Widgets
|
||||
Qt5::PrintSupport
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::PrintSupport
|
||||
${DtkWidget_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${LIBRARY_INSTALL_PREFIX})
|
||||
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${LIBRARY_INSTALL_PREFIX})
|
||||
|
|
@ -28,8 +28,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||
set(QT_MINIMUM_VERSION "5.7.1")
|
||||
set(LXQTBT_MINIMUM_VERSION "0.6.0")
|
||||
|
||||
find_package(Qt5Widgets "${QT_MINIMUM_VERSION}" REQUIRED)
|
||||
find_package(Qt5LinguistTools "${QT_MINIMUM_VERSION}" REQUIRED)
|
||||
#find_package(Qt5Widgets "${QT_MINIMUM_VERSION}" REQUIRED)
|
||||
#find_package(Qt5LinguistTools "${QT_MINIMUM_VERSION}" REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR}Widgets REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR}LinguistTools REQUIRED)
|
||||
if (${QT_VERSION_MAJOR} MATCHES 6)
|
||||
find_package(Qt6Core5Compat REQUIRED)
|
||||
endif()
|
||||
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
|
||||
|
||||
if(USE_UTF8PROC)
|
||||
|
|
@ -110,9 +115,15 @@ message(STATUS "Translations will be installed in: ${TRANSLATIONS_DIR}")
|
|||
|
||||
CHECK_FUNCTION_EXISTS(updwtmpx HAVE_UPDWTMPX)
|
||||
|
||||
qt5_wrap_cpp(MOCS ${HDRS})
|
||||
qt5_wrap_ui(UI_SRCS ${UI})
|
||||
set(PKG_CONFIG_REQ "Qt5Widgets")
|
||||
if (${QT_VERSION_MAJOR} MATCHES 6)
|
||||
qt6_wrap_cpp(MOCS ${HDRS})
|
||||
qt6_wrap_ui(UI_SRCS ${UI})
|
||||
else()
|
||||
qt5_wrap_cpp(MOCS ${HDRS})
|
||||
qt5_wrap_ui(UI_SRCS ${UI})
|
||||
endif()
|
||||
|
||||
set(PKG_CONFIG_REQ "Qt${QT_VERSION_MAJOR}Widgets")
|
||||
|
||||
lxqt_translate_ts(QTERMWIDGET_QM
|
||||
TRANSLATION_DIR "lib/translations"
|
||||
|
|
@ -127,7 +138,10 @@ lxqt_translate_ts(QTERMWIDGET_QM
|
|||
)
|
||||
|
||||
add_library(${QTERMWIDGET_LIBRARY_NAME} SHARED ${SRCS} ${MOCS} ${UI_SRCS} ${QTERMWIDGET_QM})
|
||||
target_link_libraries(${QTERMWIDGET_LIBRARY_NAME} Qt5::Widgets)
|
||||
target_link_libraries(${QTERMWIDGET_LIBRARY_NAME} Qt${QT_VERSION_MAJOR}::Widgets)
|
||||
if (${QT_VERSION_MAJOR} MATCHES 6)
|
||||
target_link_libraries(${QTERMWIDGET_LIBRARY_NAME} Qt6::Core5Compat)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_compile_definitions(${QTERMWIDGET_LIBRARY_NAME}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,12 @@ public:
|
|||
union
|
||||
{
|
||||
/** The unicode character value for this character. */
|
||||
wchar_t character;
|
||||
/**
|
||||
#if QT_VERSION >= 0x060000
|
||||
char16_t character;
|
||||
#else
|
||||
wchar_t character;
|
||||
#endif
|
||||
/**
|
||||
* Experimental addition which allows a single Character instance to contain more than
|
||||
* one unicode character.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <QRandomGenerator>
|
||||
|
||||
// KDE
|
||||
//#include <KColorScheme>
|
||||
|
|
@ -177,11 +177,9 @@ void ColorScheme::setColorTableEntry(int index , const ColorEntry& entry)
|
|||
}
|
||||
ColorEntry ColorScheme::colorEntry(int index , uint randomSeed) const
|
||||
{
|
||||
Q_UNUSED(randomSeed);
|
||||
Q_ASSERT( index >= 0 && index < TABLE_COLORS );
|
||||
|
||||
if ( randomSeed != 0 )
|
||||
qsrand(randomSeed);
|
||||
|
||||
ColorEntry entry = colorTable()[index];
|
||||
|
||||
if ( randomSeed != 0 &&
|
||||
|
|
@ -191,9 +189,9 @@ ColorEntry ColorScheme::colorEntry(int index , uint randomSeed) const
|
|||
const RandomizationRange& range = _randomTable[index];
|
||||
|
||||
|
||||
int hueDifference = range.hue ? (qrand() % range.hue) - range.hue/2 : 0;
|
||||
int saturationDifference = range.saturation ? (qrand() % range.saturation) - range.saturation/2 : 0;
|
||||
int valueDifference = range.value ? (qrand() % range.value) - range.value/2 : 0;
|
||||
int hueDifference = range.hue ? (QRandomGenerator::global()->bounded(range.hue)) - range.hue/2 : 0;
|
||||
int saturationDifference = range.saturation ? (QRandomGenerator::global()->bounded(range.saturation)) - range.saturation/2 : 0;
|
||||
int valueDifference = range.value ? (QRandomGenerator::global()->bounded(range.value)) - range.value/2 : 0;
|
||||
|
||||
QColor& color = entry.color;
|
||||
|
||||
|
|
@ -367,9 +365,9 @@ void ColorScheme::readColorEntry(QSettings * s , int index)
|
|||
if (hexColorPattern.match(colorStr).hasMatch())
|
||||
{
|
||||
// Parsing is always ok as already matched by the regexp
|
||||
r = colorStr.midRef(1, 2).toInt(nullptr, 16);
|
||||
g = colorStr.midRef(3, 2).toInt(nullptr, 16);
|
||||
b = colorStr.midRef(5, 2).toInt(nullptr, 16);
|
||||
r = colorStr.mid(1, 2).toInt(nullptr, 16);
|
||||
g = colorStr.mid(3, 2).toInt(nullptr, 16);
|
||||
b = colorStr.mid(5, 2).toInt(nullptr, 16);
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -502,7 +500,7 @@ ColorScheme* KDE3ColorSchemeReader::read()
|
|||
|
||||
ColorScheme* scheme = new ColorScheme();
|
||||
|
||||
QRegExp comment(QLatin1String("#.*$"));
|
||||
QRegularExpression comment(QLatin1String("#.*$"));
|
||||
while ( !_device->atEnd() )
|
||||
{
|
||||
QString line(QString::fromUtf8(_device->readLine()));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include "Emulation.h"
|
||||
#include "HistorySearch.h"
|
||||
|
||||
HistorySearch::HistorySearch(EmulationPtr emulation, QRegExp regExp,
|
||||
HistorySearch::HistorySearch(EmulationPtr emulation, QRegularExpression regExp,
|
||||
bool forwards, int startColumn, int startLine,
|
||||
QObject* parent) :
|
||||
QObject(parent),
|
||||
|
|
@ -41,7 +41,7 @@ HistorySearch::~HistorySearch() {
|
|||
void HistorySearch::search() {
|
||||
bool found = false;
|
||||
|
||||
if (! m_regExp.isEmpty())
|
||||
if( ! m_regExp.isValid())
|
||||
{
|
||||
if (m_forwards) {
|
||||
found = search(m_startColumn, m_startLine, -1, m_emulation->lineCount()) || search(0, 0, m_startColumn, m_startLine);
|
||||
|
|
@ -119,7 +119,8 @@ bool HistorySearch::search(int startColumn, int startLine, int endColumn, int en
|
|||
|
||||
if (matchStart > -1)
|
||||
{
|
||||
int matchEnd = matchStart + m_regExp.matchedLength() - 1;
|
||||
auto match = m_regExp.match(string);
|
||||
int matchEnd = matchStart + match.capturedLength() - 1;
|
||||
qDebug() << "Found in string from" << matchStart << "to" << matchEnd;
|
||||
|
||||
// Translate startPos and endPos to startColum, startLine, endColumn and endLine in history.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QMap>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <Session.h>
|
||||
#include <ScreenWindow.h>
|
||||
|
|
@ -38,7 +39,7 @@ class HistorySearch : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit HistorySearch(EmulationPtr emulation, QRegExp regExp, bool forwards,
|
||||
explicit HistorySearch(EmulationPtr emulation, QRegularExpression regExp, bool forwards,
|
||||
int startColumn, int startLine, QObject* parent);
|
||||
|
||||
~HistorySearch();
|
||||
|
|
@ -55,7 +56,7 @@ private:
|
|||
|
||||
|
||||
EmulationPtr m_emulation;
|
||||
QRegExp m_regExp;
|
||||
QRegularExpression m_regExp;
|
||||
bool m_forwards;
|
||||
int m_startColumn;
|
||||
int m_startLine;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <QKeySequence>
|
||||
#include <QDir>
|
||||
#include <QtDebug>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include "tools.h"
|
||||
|
||||
|
|
@ -532,10 +533,10 @@ QList<KeyboardTranslatorReader::Token> KeyboardTranslatorReader::tokenize(const
|
|||
text = text.simplified();
|
||||
|
||||
// title line: keyboard "title"
|
||||
static QRegExp title(QLatin1String("keyboard\\s+\"(.*)\""));
|
||||
QRegularExpression title(QLatin1String("keyboard\\s+\"(.*)\""));
|
||||
// key line: key KeySequence : "output"
|
||||
// key line: key KeySequence : command
|
||||
static QRegExp key(QLatin1String("key\\s+([\\w\\+\\s\\-\\*\\.]+)\\s*:\\s*(\"(.*)\"|\\w+)"));
|
||||
QRegularExpression key(QLatin1String("key\\s+([\\w\\+\\s\\-\\*\\.]+)\\s*:\\s*(\"(.*)\"|\\w+)"));
|
||||
|
||||
QList<Token> list;
|
||||
if ( text.isEmpty() )
|
||||
|
|
@ -543,30 +544,31 @@ QList<KeyboardTranslatorReader::Token> KeyboardTranslatorReader::tokenize(const
|
|||
return list;
|
||||
}
|
||||
|
||||
if ( title.exactMatch(text) )
|
||||
if ( title.match(text).hasMatch() )
|
||||
{
|
||||
auto match = title.match(text);
|
||||
Token titleToken = { Token::TitleKeyword , QString() };
|
||||
Token textToken = { Token::TitleText , title.capturedTexts().at(1) };
|
||||
|
||||
Token textToken = { Token::TitleText , match.capturedTexts().at(1) };
|
||||
list << titleToken << textToken;
|
||||
}
|
||||
else if ( key.exactMatch(text) )
|
||||
else if ( key.match(text).hasMatch() )
|
||||
{
|
||||
auto match = key.match(text);
|
||||
Token keyToken = { Token::KeyKeyword , QString() };
|
||||
Token sequenceToken = { Token::KeySequence , key.capturedTexts().value(1).remove(QLatin1Char(' ')) };
|
||||
Token sequenceToken = { Token::KeySequence , match.capturedTexts().value(1).remove(QLatin1Char(' ')) };
|
||||
|
||||
list << keyToken << sequenceToken;
|
||||
|
||||
if ( key.capturedTexts().at(3).isEmpty() )
|
||||
if ( match.capturedTexts().size() < 4 || match.capturedTexts().at(3).isEmpty() )
|
||||
{
|
||||
// capturedTexts()[2] is a command
|
||||
Token commandToken = { Token::Command , key.capturedTexts().at(2) };
|
||||
Token commandToken = { Token::Command , match.capturedTexts().at(2) };
|
||||
list << commandToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
// capturedTexts()[3] is the output string
|
||||
Token outputToken = { Token::OutputText , key.capturedTexts().at(3) };
|
||||
Token outputToken = { Token::OutputText , match.capturedTexts().at(3) };
|
||||
list << outputToken;
|
||||
}
|
||||
}
|
||||
|
|
@ -664,7 +666,8 @@ QByteArray KeyboardTranslator::Entry::escapedText(bool expandWildCards,Qt::Keybo
|
|||
|
||||
if ( replacement == 'x' )
|
||||
{
|
||||
result.replace(i,1,"\\x"+QByteArray(1,ch).toHex());
|
||||
QByteArray data = "\\x"+QByteArray(1,ch).toHex();
|
||||
result.replace(i,1,data);
|
||||
} else if ( replacement != 0 )
|
||||
{
|
||||
result.remove(i,1);
|
||||
|
|
@ -682,7 +685,7 @@ QByteArray KeyboardTranslator::Entry::unescape(const QByteArray& input) const
|
|||
for ( int i = 0 ; i < result.count()-1 ; i++ )
|
||||
{
|
||||
|
||||
QByteRef ch = result[i];
|
||||
auto ch = result[i];
|
||||
if ( ch == '\\' )
|
||||
{
|
||||
char replacement[2] = {0,0};
|
||||
|
|
|
|||
|
|
@ -317,10 +317,11 @@ int Pty::foregroundProcessGroup() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
// TODO: we need to handle this
|
||||
#if QT_VERSION < 0x060000
|
||||
void Pty::setupChildProcess()
|
||||
{
|
||||
KPtyProcess::setupChildProcess();
|
||||
|
||||
// reset all signal handlers
|
||||
// this ensures that terminal applications respond to
|
||||
// signals generated via key sequences such as Ctrl+C
|
||||
|
|
@ -328,11 +329,13 @@ void Pty::setupChildProcess()
|
|||
struct sigaction action;
|
||||
sigset_t sigset;
|
||||
sigemptyset(&action.sa_mask);
|
||||
sigemptyset(&sigset);
|
||||
action.sa_handler = SIG_DFL;
|
||||
action.sa_flags = 0;
|
||||
for (int signal=1;signal < NSIG; signal++) {
|
||||
sigaction(signal,&action,0L);
|
||||
sigaction(signal,&action,nullptr);
|
||||
sigaddset(&sigset, signal);
|
||||
}
|
||||
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
|
||||
sigprocmask(SIG_UNBLOCK, &sigset, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -188,8 +188,10 @@ Q_OBJECT
|
|||
*/
|
||||
void receivedData(const char* buffer, int length);
|
||||
|
||||
protected:
|
||||
void setupChildProcess();
|
||||
#if QT_VERSION < 0x060000
|
||||
protected:
|
||||
void setupChildProcess() override;
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
// called when data is received from the terminal process
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@
|
|||
|
||||
// Qt
|
||||
#include <QApplication>
|
||||
#include <QByteRef>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QRegExp>
|
||||
#include <QStringList>
|
||||
#include <QFile>
|
||||
#include <QtDebug>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include "Pty.h"
|
||||
//#include "kptyprocess.h"
|
||||
|
|
@ -381,7 +381,11 @@ void Session::setUserTitle( int what, const QString & caption )
|
|||
|
||||
if (what == 31) {
|
||||
QString cwd=caption;
|
||||
#if QT_VERSION >= 0x060000
|
||||
cwd=cwd.replace( QRegularExpression(QLatin1String("^~")), QDir::homePath() );
|
||||
#else
|
||||
cwd=cwd.replace( QRegExp(QLatin1String("^~")), QDir::homePath() );
|
||||
#endif
|
||||
emit openUrlRequest(cwd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,19 +252,19 @@ void TerminalDisplay::fontChange(const QFont&)
|
|||
void TerminalDisplay::calDrawTextAdditionHeight(QPainter& painter)
|
||||
{
|
||||
QRect test_rect, feedback_rect;
|
||||
test_rect.setRect(1, 1, _fontWidth * 4, _fontHeight);
|
||||
test_rect.setRect(1, 1, _fontWidth * 4, _fontHeight);
|
||||
painter.drawText(test_rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + QLatin1String("Mq"), &feedback_rect);
|
||||
|
||||
//qDebug() << "test_rect:" << test_rect << "feeback_rect:" << feedback_rect;
|
||||
//qDebug() << "test_rect:" << test_rect << "feeback_rect:" << feedback_rect;
|
||||
|
||||
_drawTextAdditionHeight = (feedback_rect.height() - _fontHeight) / 2;
|
||||
if(_drawTextAdditionHeight < 0) {
|
||||
_drawTextAdditionHeight = 0;
|
||||
}
|
||||
_drawTextAdditionHeight = (feedback_rect.height() - _fontHeight) / 2;
|
||||
if(_drawTextAdditionHeight < 0) {
|
||||
_drawTextAdditionHeight = 0;
|
||||
}
|
||||
|
||||
// update the original content
|
||||
// update the original content
|
||||
_drawTextTestFlag = false;
|
||||
update();
|
||||
update();
|
||||
}
|
||||
|
||||
void TerminalDisplay::setVTFont(const QFont& f)
|
||||
|
|
@ -276,8 +276,9 @@ void TerminalDisplay::setVTFont(const QFont& f)
|
|||
// this ensures the same handling for all platforms
|
||||
// but then there was revealed that various Linux distros
|
||||
// have this problem too...
|
||||
font.setStyleStrategy(QFont::ForceIntegerMetrics);
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
font.setStyleStrategy(QFont::ForceIntegerMetrics);
|
||||
#endif
|
||||
QFontMetrics metrics(font);
|
||||
|
||||
if ( !QFontInfo(font).fixedPitch() )
|
||||
|
|
@ -1946,7 +1947,13 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
|
|||
spot->activate(QLatin1String("click-action"));
|
||||
}
|
||||
}
|
||||
else if ( ev->button() == Qt::MidButton )
|
||||
else if ( ev->button() ==
|
||||
#if QT_VERSION >= 0x060000
|
||||
Qt::MiddleButton
|
||||
#else
|
||||
Qt::MidButton
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
|
||||
emitSelection(true,ev->modifiers() & Qt::ControlModifier);
|
||||
|
|
@ -2037,7 +2044,13 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
|
|||
int button = 3;
|
||||
if (ev->buttons() & Qt::LeftButton)
|
||||
button = 0;
|
||||
if (ev->buttons() & Qt::MidButton)
|
||||
if (ev->buttons() &
|
||||
#if QT_VERSION >= 0x060000
|
||||
Qt::MiddleButton
|
||||
#else
|
||||
Qt::MidButton
|
||||
#endif
|
||||
)
|
||||
button = 1;
|
||||
if (ev->buttons() & Qt::RightButton)
|
||||
button = 2;
|
||||
|
|
@ -2079,7 +2092,14 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
|
|||
if (_actSel == 0) return;
|
||||
|
||||
// don't extend selection while pasting
|
||||
if (ev->buttons() & Qt::MidButton) return;
|
||||
if (ev->buttons() &
|
||||
#if QT_VERSION >= 0x060000
|
||||
Qt::MiddleButton
|
||||
#else
|
||||
Qt::MidButton
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
extendSelection( ev->pos() );
|
||||
}
|
||||
|
|
@ -2334,9 +2354,21 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
|
|||
|
||||
if ( !_mouseMarks &&
|
||||
((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier))
|
||||
|| ev->button() == Qt::MidButton) )
|
||||
|| ev->button() ==
|
||||
#if QT_VERSION >= 0x060000
|
||||
Qt::MiddleButton
|
||||
#else
|
||||
Qt::MidButton
|
||||
#endif
|
||||
))
|
||||
{
|
||||
emit mouseSignal( ev->button() == Qt::MidButton ? 1 : 2,
|
||||
emit mouseSignal( ev->button() ==
|
||||
#if QT_VERSION >= 0x060000
|
||||
Qt::MiddleButton
|
||||
#else
|
||||
Qt::MidButton
|
||||
#endif
|
||||
? 1 : 2,
|
||||
charColumn + 1,
|
||||
charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
|
||||
2);
|
||||
|
|
@ -2483,8 +2515,8 @@ void TerminalDisplay::mouseDoubleClickEvent(QMouseEvent* ev)
|
|||
|
||||
void TerminalDisplay::wheelEvent( QWheelEvent* ev )
|
||||
{
|
||||
if (ev->orientation() != Qt::Vertical)
|
||||
return;
|
||||
if (ev->angleDelta().y() == 0)
|
||||
return;
|
||||
|
||||
// if the terminal program is not interested mouse events
|
||||
// then send the event to the scrollbar if the slider has room to move
|
||||
|
|
@ -2503,10 +2535,10 @@ void TerminalDisplay::wheelEvent( QWheelEvent* ev )
|
|||
// to get a reasonable scrolling speed, scroll by one line for every 5 degrees
|
||||
// of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees,
|
||||
// giving a scroll of 3 lines
|
||||
int key = ev->delta() > 0 ? Qt::Key_Up : Qt::Key_Down;
|
||||
int key = ev->angleDelta().y() > 0 ? Qt::Key_Up : Qt::Key_Down;
|
||||
|
||||
// QWheelEvent::delta() gives rotation in eighths of a degree
|
||||
int wheelDegrees = ev->delta() / 8;
|
||||
// QWheelEvent::angleDelta().y() gives rotation in eighths of a degree
|
||||
int wheelDegrees = ev->angleDelta().y() / 8;
|
||||
int linesToScroll = abs(wheelDegrees) / 5;
|
||||
|
||||
QKeyEvent keyScrollEvent(QEvent::KeyPress,key,Qt::NoModifier);
|
||||
|
|
@ -2519,14 +2551,17 @@ void TerminalDisplay::wheelEvent( QWheelEvent* ev )
|
|||
{
|
||||
// terminal program wants notification of mouse activity
|
||||
|
||||
int charLine;
|
||||
int charColumn;
|
||||
getCharacterPosition( ev->pos() , charLine , charColumn );
|
||||
|
||||
emit mouseSignal( ev->delta() > 0 ? 4 : 5,
|
||||
charColumn + 1,
|
||||
charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
|
||||
0);
|
||||
int charLine;
|
||||
int charColumn;
|
||||
#if QT_VERSION <= 0x060000
|
||||
getCharacterPosition( ev->pos() , charLine , charColumn );
|
||||
#else
|
||||
getCharacterPosition( ev->position().toPoint() , charLine , charColumn );
|
||||
#endif
|
||||
emit mouseSignal( ev->angleDelta().y() > 0 ? 4 : 5,
|
||||
charColumn + 1,
|
||||
charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
// Qt
|
||||
#include <QEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QByteRef>
|
||||
|
||||
// KDE
|
||||
//#include <kdebug.h>
|
||||
|
|
@ -413,10 +412,10 @@ void Vt102Emulation::processWindowAttributeChange()
|
|||
return;
|
||||
}
|
||||
|
||||
QString newValue;
|
||||
newValue.reserve(tokenBufferPos-i-2);
|
||||
for (int j = 0; j < tokenBufferPos-i-2; j++)
|
||||
newValue[j] = tokenBuffer[i+1+j];
|
||||
// copy from the first char after ';', and skipping the ending delimiter
|
||||
// 0x07 or 0x92. Note that as control characters in OSC text parts are
|
||||
// ignored, only the second char in ST ("\e\\") is appended to tokenBuffer.
|
||||
QString newValue = QString::fromWCharArray(tokenBuffer + i + 1, tokenBufferPos-i-2);
|
||||
|
||||
_pendingTitleUpdates[attributeToChange] = newValue;
|
||||
_titleUpdateTimer->start(20);
|
||||
|
|
@ -961,8 +960,8 @@ void Vt102Emulation::sendMouseEvent( int cb, int cx, int cy , int eventType )
|
|||
// coordinate+32, no matter what the locale is. We could easily
|
||||
// convert manually, but QString can also do it for us.
|
||||
QChar coords[2];
|
||||
coords[0] = cx + 0x20;
|
||||
coords[1] = cy + 0x20;
|
||||
coords[0] = QChar(cx + 0x20);
|
||||
coords[1] = QChar(cy + 0x20);
|
||||
QString coordsStr = QString(coords, 2);
|
||||
QByteArray utf8 = coordsStr.toUtf8();
|
||||
snprintf(command, sizeof(command), "\033[M%c%s", cb + 0x20, utf8.constData());
|
||||
|
|
@ -1341,8 +1340,8 @@ char Vt102Emulation::eraseChar() const
|
|||
{
|
||||
KeyboardTranslator::Entry entry = _keyTranslator->findEntry(
|
||||
Qt::Key_Backspace,
|
||||
0,
|
||||
0);
|
||||
Qt::NoModifier,
|
||||
KeyboardTranslator::NoState);
|
||||
if ( entry.text().count() > 0 )
|
||||
return entry.text().at(0);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -404,9 +404,9 @@ int KProcess::startDetached(const QStringList &argv)
|
|||
int KProcess::pid() const
|
||||
{
|
||||
#ifdef Q_OS_UNIX
|
||||
return (int) QProcess::pid();
|
||||
return (int) QProcess::processId();
|
||||
#else
|
||||
return QProcess::pid() ? QProcess::pid()->dwProcessId : 0;
|
||||
return QProcess::processId() ? QProcess::processId()->dwProcessId : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,10 @@ protected:
|
|||
|
||||
private:
|
||||
// hide those
|
||||
#if QT_VERSION < 0x060000
|
||||
using QProcess::setReadChannelMode;
|
||||
using QProcess::readChannelMode;
|
||||
#endif
|
||||
using QProcess::setProcessChannelMode;
|
||||
using QProcess::processChannelMode;
|
||||
|
||||
|
|
|
|||
|
|
@ -332,24 +332,28 @@ gotpty:
|
|||
(st.st_mode & (S_IRGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH))) &&
|
||||
!d->chownpty(true)) {
|
||||
qWarning()
|
||||
<< "chownpty failed for device " << ptyName << "::" << d->ttyName
|
||||
<< "\nThis means the communication can be eavesdropped." << endl;
|
||||
<< "chownpty failed for device " << ptyName << "::" << d->ttyName
|
||||
#if QT_VERSION >= 0x060000
|
||||
<< "\nThis means the communication can be eavesdropped." << Qt::endl;
|
||||
#else
|
||||
<< "\nThis means the communication can be eavesdropped." << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (HAVE__GETPTY) || defined (HAVE_GRANTPT)
|
||||
# if defined(HAVE__GETPTY) || defined(HAVE_GRANTPT)
|
||||
grantedpt:
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifdef HAVE_REVOKE
|
||||
# ifdef HAVE_REVOKE
|
||||
revoke(d->ttyName.data());
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifdef HAVE_UNLOCKPT
|
||||
# ifdef HAVE_UNLOCKPT
|
||||
unlockpt(d->masterFd);
|
||||
#elif defined(TIOCSPTLCK)
|
||||
# elif defined(TIOCSPTLCK)
|
||||
int flag = 0;
|
||||
ioctl(d->masterFd, TIOCSPTLCK, &flag);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
d->slaveFd = ::open(d->ttyName.data(), O_RDWR | O_NOCTTY);
|
||||
if (d->slaveFd < 0) {
|
||||
|
|
@ -359,11 +363,11 @@ grantedpt:
|
|||
return false;
|
||||
}
|
||||
|
||||
#if (defined(__svr4__) || defined(__sgi__))
|
||||
# if (defined(__svr4__) || defined(__sgi__))
|
||||
// Solaris
|
||||
ioctl(d->slaveFd, I_PUSH, "ptem");
|
||||
ioctl(d->slaveFd, I_PUSH, "ldterm");
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* HAVE_OPENPTY */
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,25 @@ KPtyProcess::KPtyProcess(QObject *parent) :
|
|||
d->pty->open();
|
||||
connect(this, SIGNAL(stateChanged(QProcess::ProcessState)),
|
||||
SLOT(_k_onStateChanged(QProcess::ProcessState)));
|
||||
#if QT_VERSION >= 0x060000
|
||||
setChildProcessModifier([this] {
|
||||
Q_D(KPtyProcess);
|
||||
d->pty->setCTty();
|
||||
|
||||
#if 0
|
||||
if (d->addUtmp)
|
||||
d->pty->login(KUser(KUser::UseRealUserID).loginName().toLocal8Bit().data(), qgetenv("DISPLAY"));
|
||||
#endif
|
||||
if (d->ptyChannels & StdinChannel)
|
||||
dup2(d->pty->slaveFd(), 0);
|
||||
|
||||
if (d->ptyChannels & StdoutChannel)
|
||||
dup2(d->pty->slaveFd(), 1);
|
||||
|
||||
if (d->ptyChannels & StderrChannel)
|
||||
dup2(d->pty->slaveFd(), 2);
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
KPtyProcess::KPtyProcess(int ptyMasterFd, QObject *parent) :
|
||||
|
|
@ -119,6 +138,7 @@ KPtyDevice *KPtyProcess::pty() const
|
|||
return d->pty;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
void KPtyProcess::setupChildProcess()
|
||||
{
|
||||
Q_D(KPtyProcess);
|
||||
|
|
@ -140,5 +160,6 @@ void KPtyProcess::setupChildProcess()
|
|||
|
||||
KProcess::setupChildProcess();
|
||||
}
|
||||
#endif
|
||||
|
||||
//#include "kptyprocess.moc"
|
||||
|
|
|
|||
|
|
@ -144,8 +144,9 @@ protected:
|
|||
/**
|
||||
* @reimp
|
||||
*/
|
||||
virtual void setupChildProcess();
|
||||
|
||||
#if QT_VERSION < 0x060000 // move to KPtyProcess()
|
||||
void setupChildProcess() override;
|
||||
#endif
|
||||
private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _k_onStateChanged(QProcess::ProcessState))
|
||||
};
|
||||
|
|
|
|||
|
|
@ -159,10 +159,10 @@ void QTermWidget::search(bool forwards, bool next)
|
|||
qDebug() << "current selection starts at: " << startColumn << startLine;
|
||||
qDebug() << "current cursor position: " << m_impl->m_terminalDisplay->screenWindow()->cursorPosition();
|
||||
|
||||
QRegExp regExp(m_searchBar->searchText());
|
||||
regExp.setPatternSyntax(m_searchBar->useRegularExpression() ? QRegExp::RegExp : QRegExp::FixedString);
|
||||
regExp.setCaseSensitivity(m_searchBar->matchCase() ? Qt::CaseSensitive : Qt::CaseInsensitive);
|
||||
|
||||
QRegularExpression regExp(m_searchBar->searchText(),
|
||||
m_searchBar->matchCase() ? QRegularExpression::CaseInsensitiveOption|
|
||||
QRegularExpression::UseUnicodePropertiesOption
|
||||
: QRegularExpression::UseUnicodePropertiesOption);
|
||||
HistorySearch *historySearch =
|
||||
new HistorySearch(m_impl->m_session->emulation(), regExp, forwards, startColumn, startLine, this);
|
||||
connect(historySearch, SIGNAL(matchFound(int, int, int, int)), this, SLOT(matchFound(int, int, int, int)));
|
||||
|
|
@ -253,13 +253,17 @@ void QTermWidget::startTerminalTeletype()
|
|||
void QTermWidget::init(int startnow)
|
||||
{
|
||||
m_layout = new QVBoxLayout();
|
||||
m_layout->setMargin(0);
|
||||
m_layout->setContentsMargins(0, 0, 0, 0);
|
||||
setLayout(m_layout);
|
||||
|
||||
// translations
|
||||
// First check $XDG_DATA_DIRS. This follows the implementation in libqtxdg
|
||||
QString d = QFile::decodeName(qgetenv("XDG_DATA_DIRS"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList dirs = d.split(QLatin1Char(':'), Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList dirs = d.split(QLatin1Char(':'), QString::SkipEmptyParts);
|
||||
#endif
|
||||
if (dirs.isEmpty()) {
|
||||
dirs.append(QString::fromLatin1("/usr/local/share"));
|
||||
dirs.append(QString::fromLatin1("/usr/share"));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1.0)
|
||||
cmake_minimum_required(VERSION 3.18.0)
|
||||
|
||||
project(deepin-unioncode)
|
||||
|
||||
|
|
@ -10,6 +10,9 @@ function(print_directory arg)
|
|||
endfunction()
|
||||
|
||||
set(VERSION $ENV{VERSION})
|
||||
# build with -fPIC flag in .a library on arm64
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if (NOT VERSION)
|
||||
set(VERSION "0.0.1")
|
||||
endif()
|
||||
|
|
@ -79,17 +82,36 @@ endif()
|
|||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wl,--as-need -fPIE")
|
||||
|
||||
find_package(Dtk COMPONENTS Widget REQUIRED)
|
||||
find_package(Qt6 COMPONENTS Core QUIET)
|
||||
if (Qt6_FOUND)
|
||||
set(QT_VERSION_MAJOR 6)
|
||||
else()
|
||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
endif()
|
||||
message(" >>> Found Qt version: ${QT_VERSION_MAJOR}")
|
||||
|
||||
if (QT_VERSION_MAJOR MATCHES 6)
|
||||
set(DTK_VERSION_MAJOR 6)
|
||||
set(KF_VERSION_MAJOR 6)
|
||||
else()
|
||||
set(DTK_VERSION_MAJOR "")
|
||||
set(KF_VERSION_MAJOR 5)
|
||||
endif()
|
||||
message(" >>> Build with DTK: ${DTK_VERSION_MAJOR}")
|
||||
|
||||
find_package(Dtk${DTK_VERSION_MAJOR} COMPONENTS Widget REQUIRED)
|
||||
include_directories(${PROJECT_NAME} PRIVATE ${DtkWidget_INCLUDE_DIRS})
|
||||
|
||||
# Use Qt modules no WebEngineWidgets WebChannel
|
||||
set(QtFindModules Core Gui Widgets Concurrent Network DBus)
|
||||
|
||||
foreach(QtModule ${QtFindModules})
|
||||
find_package(Qt5 COMPONENTS ${QtModule} REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${QtModule} REQUIRED)
|
||||
# include qt module private include directors
|
||||
include_directories(${Qt5${QtModule}_PRIVATE_INCLUDE_DIRS})
|
||||
include_directories(${Qt${QT_VERSION_MAJOR}${QtModule}_PRIVATE_INCLUDE_DIRS})
|
||||
# can use target_link_libraries(xxx ${QtUseModules})
|
||||
list(APPEND QtUseModules "Qt5::${QtModule}")
|
||||
list(APPEND QtUseModules "Qt${QT_VERSION_MAJOR}::${QtModule}")
|
||||
message("QtModule found ${QtModule} OK!")
|
||||
endforeach()
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,108 @@
|
|||
This file provides copyright and license information for the deepin-unioncode project and its dependencies, as required by their respective licenses.
|
||||
|
||||
---
|
||||
|
||||
Project: deepin-unioncode
|
||||
Source: https://github.com/linuxdeepin/deepin-unioncode
|
||||
|
||||
1. Configuration and Build Files
|
||||
Files: .gitlab-ci.yml, .github/*, .gitignore, .clang-format, .clog.toml, .project.json, debian/*, *.qrc, .tx/*, *CMakeLists.txt, *.cmake, *.cmake.in, *.pc.in, *.txt, src/*.json, src/*.xml, src/*.policy, src/*.js, src/*.ini, src/*.qss, src/*.css, src/*.theme, src/*/templates/*, src/*.psd, src/configures/*, src/tools/eventrecorder/include/*.gitignore, src/tools/eventrecorder/Doxyfile, src/tools/eventrecorder/preload/syscall*.cc, src/tools/eventrecorder/preload/*.S, rpm/*.spec, *.sh, *.cfg
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
License Text: Creative Commons CC0 1.0 Universal (Public Domain Dedication). See https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
2. Documentation
|
||||
Files: README*.md, docs/*, *.md
|
||||
Copyright: UnionTech Software Technology Co., Ltd.
|
||||
License: CC-BY-4.0
|
||||
License Text: Creative Commons Attribution 4.0 International. See https://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
3. Translations, Assets, Images, Desktop Files, Scripts, Plugins, and Tools
|
||||
Files: translations/*.ts, assets/*, src/apps/*/assets/*, src/*.png, src/*.svg, src/*.jpg, src/*.desktop, src/scripts/*, src/plugin/*, src/tool/*
|
||||
Copyright: UnionTech Software Technology Co., Ltd.
|
||||
License: GPL-3.0-or-later
|
||||
License Text: GNU General Public License, version 3 or later. See https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
4. FlameGraph
|
||||
Files: 3rdparty/scripts/*
|
||||
Copyright: 2013 Brendan Gregg
|
||||
License: GPL-3.0-or-later
|
||||
License Text: GNU General Public License, version 3 or later. See https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
5. cppdap and diff_match_patch
|
||||
Files: 3rdparty/cppdap/src/*, 3rdparty/cppdap/include/*, 3rdparty/cppdap/examples/*, 3rdparty/cppdap/fuzz/*, 3rdparty/cppdap/kokoro/*, 3rdparty/cppdap/CONTRIBUTING, 3rdparty/diff-match-patch/*
|
||||
Copyright: 2019 Google LLC
|
||||
License: Apache-2.0
|
||||
License Text: Apache License, Version 2.0. See https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
6. nlohmann JSON
|
||||
Files: 3rdparty/cppdap/third_party/json/*
|
||||
Copyright: 2019 Google LLC
|
||||
License: MIT
|
||||
License Text: MIT License. See https://opensource.org/licenses/MIT
|
||||
|
||||
7. GitQlient 1.4.3
|
||||
Files: 3rdparty/unioncode-GitQlient/*
|
||||
Copyright: 2011-2017 Peter Spiess-Knafl <dev@spiessknafl.at>, 2021 Francesc Martinez <es.linkedin.com/in/cescmm/en>, 2012 Peter Spiess-Knafl <dev@spiessknafl.at>, 2016 Jean-Daniel Michaud <jean.daniel.michaud@gmail.com>, 2016 Alexandre Poirot <alexandre.poirot@legrand.fr>, 2017 Jacques Software <software@jacques.com.au>
|
||||
License: LGPL-2.1-or-later
|
||||
License Text: GNU Lesser General Public License, version 2.1 or later. See https://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
8. jsonrpc 1.4.1
|
||||
Files: 3rdparty/unioncode-jsonrpccpp/*
|
||||
Copyright: 2015 Alexandre Poirot
|
||||
License: MIT
|
||||
License Text: MIT License. See https://opensource.org/licenses/MIT
|
||||
|
||||
9. qtermwidget 0.14.1
|
||||
Files: 3rdparty/unioncode-qtermwidget-0.14.1/*
|
||||
Copyright: Adriaan de Groot <groot@kde.org>, 2010 KDE e.V <kde-ev-board@kde.org>, 2002-2007 Oswald Buddenhagen <ossi@kde.org>, 2006-2008 Robert Knight <robertknight@gmail.com>, 2002 Waldo Bastian <bastian@kde.org>, 2008 e_k <e_k@users.sourceforge.net>
|
||||
License: GPL-2.0-or-later
|
||||
License Text: GNU General Public License, version 2 or later. See https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
10. qtermwidget (Examples and Libraries)
|
||||
Files: 3rdparty/unioncode-qtermwidget-0.14.1/example/*, 3rdparty/unioncode-qtermwidget-0.14.1/lib/*
|
||||
Copyright: Adriaan de Groot <groot@kde.org>, 2010 KDE e.V <kde-ev-board@kde.org>, 2002-2007 Oswald Buddenhagen <ossi@kde.org>, 2006-2008 Robert Knight <robertknight@gmail.com>, 2002 Waldo Bastian <bastian@kde.org>, 2008 e_k <e_k@users.sourceforge.net>
|
||||
License: LGPL-2.0-or-later
|
||||
License Text: GNU Lesser General Public License, version 2 or later. See https://www.gnu.org/licenses/lgpl-2.0.html
|
||||
|
||||
11. qtermwidget (CMake Files)
|
||||
Files: 3rdparty/unioncode-qtermwidget-0.14.1/pyqt/cmake/*, 3rdparty/unioncode-qtermwidget-0.14.1/cmake/*
|
||||
Copyright: 2012 Luca Beltrame <lbeltrame@kde.org>, 2012 Rolf Eike Beer <eike@sf-mail.de>, 2007-2014 Simon Edwards <simon@simonzone.com>
|
||||
License: BSD-3-Clause
|
||||
License Text: BSD 3-Clause License. See https://opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
12. qscintilla 2.14
|
||||
Files: 3rdparty/unioncode-qscintilla214/src/*
|
||||
Copyright: 2023 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
License: GPL-3.0-or-later
|
||||
License Text: GNU General Public License, version 3 or later. See https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
13. scintilla
|
||||
Files: 3rdparty/unioncode-qscintilla214/scintilla/*
|
||||
Copyright: 1998-2021 Neil Hodgson <neilh@scintilla.org>
|
||||
License: HPND (Historical Permission Notice and Disclaimer)
|
||||
License Text: See https://www.scintilla.org/License.txt
|
||||
|
||||
14. Event Recorder (Architecture-Specific Files)
|
||||
Files: src/tools/eventrecorder/aarch64/*, src/tools/eventrecorder/mips64/*, src/tools/eventrecorder/sw64/*, src/tools/eventrecorder/x86_64/*
|
||||
Copyright: 1993 Branko Lankester <branko@hacktic.nl>
|
||||
License: BSD-Protection
|
||||
License Text: BSD Protection License. See https://fedoraproject.org/wiki/Licensing/BSD#Protection
|
||||
|
||||
15. Event Recorder (ScopedFd, easylogging, linenoise)
|
||||
Files: src/tools/eventrecorder/ScopedFd.h, src/tools/eventrecorder/easylogging*, src/tools/eventrecorder/linenoise*
|
||||
Copyright: 2012-2018 Zuhd Web Services
|
||||
License: MIT
|
||||
License Text: MIT License. See https://opensource.org/licenses/MIT
|
||||
|
||||
16. Event Recorder (Wait)
|
||||
Files: src/tools/eventrecorder/Wait*
|
||||
Copyright: 2002 Niels Provos <provos@citi.umich.edu>
|
||||
License: BSD-Protection
|
||||
License Text: BSD Protection License. See https://fedoraproject.org/wiki/Licensing/BSD#Protection
|
||||
|
||||
17. Event Recorder (DWARF and ELF)
|
||||
Files: src/tools/eventrecorder/include/dwarf/*, src/tools/eventrecorder/include/elf/*
|
||||
Copyright: 2013 Austin T. Clements
|
||||
License: MIT
|
||||
License Text: MIT License. See https://opensource.org/licenses/MIT
|
||||
17
README.en.md
17
README.en.md
|
|
@ -1,8 +1,8 @@
|
|||
# deepin-unioncode
|
||||
# deepin-ide
|
||||
|
||||
[](./README.md)
|
||||
|
||||
deepin-unioncode is a lightweight integrated development environment, featured with multilingual and cross platform compatibility.
|
||||
deepin-ide (original name:deepin-unioncode) is a lightweight integrated development environment, featured with multilingual and cross platform compatibility.
|
||||
|
||||
## Build dependencies
|
||||
|
||||
|
|
@ -50,9 +50,9 @@ _The **dev** branch is current development branch, build dependencies may change
|
|||
1. Make sure you have installed all dependencies.
|
||||
|
||||
``` shell
|
||||
$ git clone https://github.com/linuxdeepin/deepin-unioncode.git
|
||||
(gitee: $ git clone https://gitee.com/deepin-community/deepin-unioncode.git)
|
||||
$ cd deepin-unioncode
|
||||
$ git clone https://github.com/linuxdeepin/deepin-ide.git
|
||||
(gitee: $ git clone https://gitee.com/deepin-community/deepin-ide.git)
|
||||
$ cd deepin-ide
|
||||
$ sudo apt build-dep ./
|
||||
```
|
||||
|
||||
|
|
@ -69,11 +69,11 @@ $ cmake --build build
|
|||
$ sudo cmake --build build --target install
|
||||
```
|
||||
|
||||
The executable binary file could be found at `/usr/bin/deepin-unioncode`
|
||||
The executable binary file could be found at `/usr/bin/deepin-ide`
|
||||
|
||||
## Usage
|
||||
|
||||
Execute `deepin-unioncode`
|
||||
Execute `deepin-ide`
|
||||
|
||||
*Attention: After the installation of deepin-unicode, some features require the installation of dependency packages before they can be used normally.*
|
||||
|
||||
|
|
@ -97,7 +97,6 @@ Execute `deepin-unioncode`
|
|||
## Getting help
|
||||
|
||||
- [Official Forum](https://bbs.deepin.org/)
|
||||
- [User guide](https://wiki.deepin.org/zh/05_HOW-TO/02_%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3/deepin-unioncode)
|
||||
- [Extended guide](./docs/extended-guide.md)
|
||||
- [Developer Center](https://github.com/linuxdeepin/developer-center)
|
||||
- [Gitter](https://gitter.im/orgs/linuxdeepin/rooms)
|
||||
|
|
@ -113,7 +112,7 @@ We encourage you to report issues and contribute changes
|
|||
|
||||
## License
|
||||
|
||||
deepin-unioncode is licensed under [GPL-3.0-or-later](LICENSE)
|
||||
deepin-ide is licensed under [GPL-3.0-or-later](LICENSE)
|
||||
|
||||
## 3rdparty support
|
||||
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -1,8 +1,8 @@
|
|||
# deepin-unioncode
|
||||
# deepin-ide
|
||||
|
||||
[](./README.en.md)
|
||||
|
||||
deepin-unioncode 是一款支持多语言、跨平台兼容特性的轻量级集成开发环境。
|
||||
deepin-ide (原名:deepin-unioncode) 是一款支持多语言、跨平台兼容特性的轻量级集成开发环境。
|
||||
|
||||
## 构建依赖
|
||||
|
||||
|
|
@ -51,9 +51,9 @@ _当前的开发分支为**dev**,编译依赖可能会在没有更新本说明
|
|||
|
||||
|
||||
``` shell
|
||||
$ git clone https://github.com/linuxdeepin/deepin-unioncode.git
|
||||
(gitee: $ git clone https://gitee.com/deepin-community/deepin-unioncode.git)
|
||||
$ cd deepin-unioncode
|
||||
$ git clone https://github.com/linuxdeepin/deepin-ide.git
|
||||
(gitee: $ git clone https://gitee.com/deepin-community/deepin-ide.git)
|
||||
$ cd deepin-ide
|
||||
$ sudo apt build-dep ./
|
||||
```
|
||||
|
||||
|
|
@ -70,13 +70,13 @@ $ cmake --build build
|
|||
$ sudo cmake --build build --target install
|
||||
```
|
||||
|
||||
可执行程序为 `/usr/bin/deepin-unioncode`
|
||||
可执行程序为 `/usr/bin/deepin-ide`
|
||||
|
||||
## 使用
|
||||
|
||||
启动栏执行 `deepin-unioncode`
|
||||
启动栏执行 `deepin-ide`
|
||||
|
||||
*注意:deepin-unioncode安装后,部分功能需要安装依赖包后才能正常使用。*
|
||||
*注意:deepin-ide安装后,部分功能需要安装依赖包后才能正常使用。*
|
||||
|
||||
## 支持的语言工程
|
||||
|
||||
|
|
@ -98,7 +98,6 @@ $ sudo cmake --build build --target install
|
|||
## 帮助
|
||||
|
||||
- [官方论坛](https://bbs.deepin.org/)
|
||||
- [用户使用手册](https://wiki.deepin.org/zh/05_HOW-TO/02_%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3/deepin-unioncode)
|
||||
- [扩展指南](./docs/extended-guide.md)
|
||||
- [开发者中心](https://github.com/linuxdeepin/developer-center)
|
||||
- [Gitter](https://gitter.im/orgs/linuxdeepin/rooms)
|
||||
|
|
@ -114,7 +113,7 @@ $ sudo cmake --build build --target install
|
|||
|
||||
## 开源许可证
|
||||
|
||||
deepin-unioncode 在 [GPL-3.0-or-later](LICENSE)下发布。
|
||||
deepin-ide 在 [GPL-3.0-or-later](LICENSE)下发布。
|
||||
|
||||
## 三方库支持
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ install(DIRECTORY templates/
|
|||
install(DIRECTORY models/
|
||||
DESTINATION "${SOURCES_INSTALL_RPEFIX}/models")
|
||||
|
||||
find_package(Qt5 COMPONENTS LinguistTools)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools)
|
||||
|
||||
# install translation.
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
file(GLOB TS_FILES "translations/*.ts")
|
||||
foreach(TS_FILE IN LISTS TS_FILES)
|
||||
message(STATUS "process ts file: ${TS_FILE}")
|
||||
find_program(LUPDATE_COMMAND NAMES lupdate lupdate-qt5 lupdate-qt4 lupdate-pro)
|
||||
find_program(LUPDATE_COMMAND NAMES lupdate lupdate-Qt${QT_VERSION_MAJOR} lupdate-qt4 lupdate-pro)
|
||||
if (NOT LUPDATE_COMMAND)
|
||||
message(FATAL_ERROR "lupdate command not found")
|
||||
endif()
|
||||
|
|
@ -46,4 +46,4 @@ file(GLOB ICON "${CMAKE_CURRENT_SOURCE_DIR}/configures/*.svg")
|
|||
|
||||
install(FILES ${SUPPORTFILES} DESTINATION "${SOURCES_INSTALL_RPEFIX}/configures")
|
||||
install(FILES ${DESKTOPFILES} DESTINATION "/usr/share/applications")
|
||||
install(FILES ${ICON} DESTINATION "${SOURCES_INSTALL_RPEFIX}/configures/icons")
|
||||
install(FILES ${ICON} DESTINATION "${SOURCES_INSTALL_RPEFIX}/configures/icons")
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +1,53 @@
|
|||
deepin-unioncode (1.4.11) UNRELEASED; urgency=medium
|
||||
|
||||
* Bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Mon, 28 Apr 2025 16:09:10 +0800
|
||||
|
||||
deepin-unioncode (1.4.10) UNRELEASED; urgency=medium
|
||||
|
||||
* Adapt qt6.8
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Wed, 23 Apr 2025 09:31:26 +0800
|
||||
|
||||
deepin-unioncode (1.4.9) UNRELEASED; urgency=medium
|
||||
|
||||
* Bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Mon, 21 Apr 2025 14:06:39 +0800
|
||||
|
||||
deepin-unioncode (1.4.8) stable; urgency=medium
|
||||
|
||||
* bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Fri, 14 Mar 2025 09:49:16 +0800
|
||||
|
||||
deepin-unioncode (1.4.7) unstable; urgency=medium
|
||||
|
||||
* Bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Thu, 13 Mar 2025 17:10:00 +0800
|
||||
|
||||
deepin-unioncode (1.4.6) stable; urgency=medium
|
||||
|
||||
* Bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Mon, 10 Mar 2025 17:01:50 +0800
|
||||
|
||||
deepin-unioncode (1.4.5) unstable; urgency=medium
|
||||
|
||||
* Disable smartut
|
||||
* Add model change feature
|
||||
* Bug fix
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Thu, 27 Feb 2025 15:30:36 +0800
|
||||
|
||||
deepin-unioncode (1.4.4) UNRELEASED; urgency=medium
|
||||
|
||||
* Adapt to qt6.8
|
||||
|
||||
-- luzhen <luzhen@uniontech.com> Fri, 21 Feb 2025 14:39:48 +0800
|
||||
|
||||
deepin-unioncode (1.4.1) stable; urgency=medium
|
||||
|
||||
* Bug fix
|
||||
|
|
|
|||
|
|
@ -5,11 +5,20 @@ Maintainer: Deepin Packages Builder <packages@linuxdeepin.com>
|
|||
Build-Depends:
|
||||
debhelper (>=9),
|
||||
cmake,
|
||||
qt5-qmake,
|
||||
qtbase5-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools,
|
||||
qtwebengine5-dev[!loong64],
|
||||
qt6-qmake | qt5-qmake,
|
||||
qt6-base-dev | qtbase5-dev,
|
||||
qt6-tools-dev-tools | qttools5-dev-tools,
|
||||
qt6-tools-dev | qttools5-dev,
|
||||
qt6-webengine-dev | qtwebengine5-dev,
|
||||
qt6-multimedia-dev,
|
||||
libdtk6widget-dev | libdtkwidget-dev,
|
||||
libdtk6gui-dev | libdtkgui-dev,
|
||||
libdtk6core-dev | libdtkcore-dev,
|
||||
libdtk6core5-bin |libdtkcore5-bin,
|
||||
libkf6syntaxhighlighting-dev | libkf5syntaxhighlighting-dev,
|
||||
qt6-script-dev | qtscript5-dev,
|
||||
qt6-5compat-dev | hello,
|
||||
libqt5scripttools5 | hello,
|
||||
lxqt-build-tools (>= 0.6.0~),
|
||||
libssl-dev,
|
||||
llvm (>=1:7~),
|
||||
|
|
@ -29,15 +38,8 @@ Build-Depends:
|
|||
libelfin-dev,
|
||||
libdbus-1-dev,
|
||||
libxi-dev,
|
||||
qtscript5-dev,
|
||||
libqt5scripttools5,
|
||||
clang[!mips64],
|
||||
doxygen,
|
||||
libdtkgui-dev,
|
||||
libdtkwidget-dev,
|
||||
libdtkcore-dev,
|
||||
libdtkcore5-bin,
|
||||
libkf5syntaxhighlighting-dev,
|
||||
libyaml-cpp-dev,
|
||||
libcmark-dev,
|
||||
libchardet-dev,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@ include /usr/share/dpkg/default.mk
|
|||
export QT_SELECT=5
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
define detect_qt_version
|
||||
ifneq (,$(shell which qmake6 2>/dev/null))
|
||||
QT_DIR="/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6"
|
||||
else
|
||||
QT_DIR="/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt5"
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call detect_qt_version))
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
|
|
@ -10,6 +20,8 @@ override_dh_auto_configure:
|
|||
dh_auto_configure -- \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DVERSION=$(PACK_VER) \
|
||||
-DQT_DIR=$(QT_DIR) \
|
||||
-DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "common/common.h"
|
||||
#include "common/settings/settings.h"
|
||||
#include "common/util/utils.h"
|
||||
|
||||
#include <framework/framework.h>
|
||||
#include <framework/lifecycle/pluginsetting.h>
|
||||
|
|
@ -103,10 +104,12 @@ void openProject(const QString &path)
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
// some platform opengl drive with wrong,so use OpenGLES instead.
|
||||
if (QSysInfo::currentCpuArchitecture().contains("arm")) {
|
||||
QSurfaceFormat format;
|
||||
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||
format.setDefaultFormat(format);
|
||||
if(utils::isWayland()) {
|
||||
if (QSysInfo::currentCpuArchitecture().contains("arm")) {
|
||||
QSurfaceFormat format;
|
||||
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||
format.setDefaultFormat(format);
|
||||
}
|
||||
}
|
||||
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ add_library(
|
|||
${PROJECT_SOURCES}
|
||||
)
|
||||
|
||||
find_package(Dtk COMPONENTS Widget Core Gui REQUIRED)
|
||||
# let code be position independent
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
find_package(Dtk${DTK_VERSION_MAJOR} COMPONENTS Widget Core Gui REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
|
|
@ -36,4 +39,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${CMAKE
|
|||
|
||||
# config cmake file
|
||||
configure_file(${CMAKE_SOURCE_DIR}/assets/dev/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake.in ${PROJECT_NAME}Config.cmake @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,25 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "abstractllm.h"
|
||||
|
||||
AbstractLLM::AbstractLLM(QObject *parent)
|
||||
: QObject(parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
qRegisterMetaType<ResponseState>("ResponseState");
|
||||
}
|
||||
|
||||
void AbstractLLM::setModelState(LLMState st)
|
||||
{
|
||||
if (state.loadAcquire() == st)
|
||||
return;
|
||||
|
||||
state.storeRelease(st);
|
||||
Q_EMIT modelStateChanged();
|
||||
}
|
||||
|
||||
AbstractLLM::LLMState AbstractLLM::modelState() const
|
||||
{
|
||||
return static_cast<LLMState>(state.loadAcquire());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
@ -14,6 +14,11 @@ class AbstractLLM : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum LLMState {
|
||||
Idle = 0,
|
||||
Busy
|
||||
};
|
||||
|
||||
enum ResponseState {
|
||||
Receiving,
|
||||
Success,
|
||||
|
|
@ -22,6 +27,13 @@ public:
|
|||
Canceled
|
||||
};
|
||||
|
||||
enum Locale {
|
||||
Zh,
|
||||
En
|
||||
};
|
||||
|
||||
using ResponseHandler = std::function<void(const QString &data, ResponseState state)>;
|
||||
|
||||
explicit AbstractLLM(QObject *parent = nullptr);
|
||||
virtual ~AbstractLLM() {}
|
||||
|
||||
|
|
@ -30,18 +42,25 @@ public:
|
|||
virtual bool checkValid(QString *errStr) = 0;
|
||||
virtual QJsonObject create(const Conversation &conversation) = 0;
|
||||
virtual void request(const QJsonObject &data) = 0;
|
||||
virtual void request(const QString &prompt) = 0;
|
||||
virtual void generate(const QString &prompt, const QString &suffix) = 0;
|
||||
virtual void request(const QString &prompt, ResponseHandler handler = nullptr) = 0;
|
||||
virtual void generate(const QString &prefix, const QString &suffix) = 0; // use to auto compelte
|
||||
virtual void setTemperature(double temperature) = 0;
|
||||
virtual void setStream(bool isStream) = 0;
|
||||
virtual void processResponse(QNetworkReply *reply) = 0;
|
||||
virtual void setLocale(Locale lc) = 0;
|
||||
virtual void cancel() = 0;
|
||||
virtual void setMaxTokens(int maxToken) = 0;
|
||||
virtual Conversation *getCurrentConversation() = 0;
|
||||
virtual bool isIdle() = 0;
|
||||
|
||||
void setModelState(LLMState st);
|
||||
LLMState modelState() const;
|
||||
|
||||
signals:
|
||||
void dataReceived(const QString &data, ResponseState statu);
|
||||
void customDataReceived(const QString &key, const QJsonObject &customData);
|
||||
void dataReceived(const QString &data, ResponseState state);
|
||||
void modelStateChanged();
|
||||
|
||||
private:
|
||||
QAtomicInt state { Idle };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
@ -70,6 +70,20 @@ bool Conversation::popUserData()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Conversation::addResponse(const QString &data)
|
||||
{
|
||||
if (!data.isEmpty()) {
|
||||
const QJsonDocument &document = QJsonDocument::fromJson(data.toUtf8());
|
||||
if (document.isArray()) {
|
||||
conversation = document.array();
|
||||
} else {
|
||||
conversation.push_back(QJsonObject({ { "role", "assistant" }, {"content", data} }));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString Conversation::getLastResponse() const
|
||||
{
|
||||
if (!conversation.isEmpty() && conversation.last()["role"].toString() == "assistant") {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ public:
|
|||
bool addUserData(const QString &data);
|
||||
bool popUserData();
|
||||
|
||||
bool addResponse(const QString &data);
|
||||
QString getLastResponse() const;
|
||||
QByteArray getLastByteResponse() const;
|
||||
bool popLastResponse();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ include(${CMAKE_SOURCE_DIR}/3rdparty/unioncode-jsonrpccpp.cmake)
|
|||
install(FILES ${CMAKE_SOURCE_DIR}/src/common/resource/icons/ide.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/)
|
||||
|
||||
configure_file(util/config.h.in config.h)
|
||||
find_package(Qt5Network)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
|
|
@ -37,13 +36,13 @@ target_include_directories(${PROJECT_NAME}
|
|||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
find_package(Qt5 COMPONENTS Concurrent REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Concurrent REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
unioncode-jsonrpcclient
|
||||
Qt5::Network
|
||||
Qt5::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
${DtkWidget_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
@ -62,4 +61,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${CMAKE
|
|||
|
||||
# config cmake file
|
||||
configure_file(${CMAKE_SOURCE_DIR}/assets/dev/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake.in ${PROJECT_NAME}Config.cmake @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
|
||||
constexpr char kKeyboardShortcuts[] = "KeyboardShortcuts";
|
||||
static ActionManager *m_instance = nullptr;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ void PropertiesDialog::setupUi(DAbstractDialog *Dialog)
|
|||
bgGroup->setItemMargins(QMargins(0, 0, 0, 0));
|
||||
bgGroup->setBackgroundRole(QPalette::Window);
|
||||
bgGroup->setUseWidgetBackground(false);
|
||||
bgGpLayout->setMargin(0);
|
||||
bgGpLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
DFrame *wrapperFrame = new DFrame(bgGroup);
|
||||
wrapperFrame->setLineWidth(0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
// SPDX-FileCopyrightText: 2023 - 2025 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue