Merge branch 'master' of github.com:royqh1979/RedPanda-CPP
This commit is contained in:
commit
3bec88db50
|
@ -63,9 +63,8 @@ CONFIG(debug_and_release_target) {
|
|||
}
|
||||
|
||||
INCLUDEPATH += ../libs/qsynedit ../libs/redpanda_qt_utils
|
||||
LIBS += -L$$OUT_PWD/../libs/redpanda_qt_utils/$$OBJ_OUT_PWD \
|
||||
-L$$OUT_PWD/../libs/qsynedit/$$OBJ_OUT_PWD \
|
||||
-lqsynedit -lredpanda_qt_utils
|
||||
LIBS += $$OUT_PWD/../libs/qsynedit/$${OBJ_OUT_PWD}libqsynedit.a
|
||||
$$OUT_PWD/../libs/redpanda_qt_utils/$${OBJ_OUT_PWD}libredpanda_qt_utils.a
|
||||
|
||||
SOURCES += \
|
||||
HighlighterManager.cpp \
|
||||
|
|
|
@ -1722,7 +1722,8 @@ void DebugReader::run()
|
|||
}
|
||||
}
|
||||
|
||||
BreakpointModel::BreakpointModel(QObject *parent):QAbstractTableModel(parent)
|
||||
BreakpointModel::BreakpointModel(QObject *parent):QAbstractTableModel(parent),
|
||||
mIsForProject(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -6135,7 +6135,11 @@ void MainWindow::on_actionAdd_to_project_triggered()
|
|||
QModelIndex parentIndex = mProject->model()->getParentIndex(newUnit->node().get());
|
||||
parentIndex = mProjectProxyModel->mapFromSource(parentIndex);
|
||||
if (parentIndex.isValid()) {
|
||||
ui->projectView->expandRecursively(index);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
ui->projectView->expandRecursively(parentIndex);
|
||||
#else
|
||||
ui->projectView->expand(parentIndex);
|
||||
#endif
|
||||
}
|
||||
if (index.isValid()) {
|
||||
ui->projectView->setCurrentIndex(index);
|
||||
|
@ -6532,7 +6536,11 @@ void MainWindow::setProjectViewCurrentNode(PProjectModelNode node)
|
|||
QModelIndex parentIndex = mProject->model()->getParentIndex(node.get());
|
||||
parentIndex = mProjectProxyModel->mapFromSource(parentIndex);
|
||||
if (parentIndex.isValid()) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
ui->projectView->expandRecursively(parentIndex);
|
||||
#else
|
||||
ui->projectView->expand(parentIndex);
|
||||
#endif
|
||||
}
|
||||
QModelIndex index = mProject->model()->getNodeIndex(node.get());
|
||||
index = mProjectProxyModel->mapFromSource(index);
|
||||
|
|
|
@ -50,6 +50,7 @@ Project::Project(const QString &filename, const QString &name,
|
|||
QObject *parent) :
|
||||
QObject(parent),
|
||||
mName(name),
|
||||
mModified(false),
|
||||
mModel(this),
|
||||
mEditorList(editorList),
|
||||
mFileSystemWatcher(fileSystemWatcher)
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <QJsonObject>
|
||||
#include <QJsonParseError>
|
||||
#include <QSet>
|
||||
#include <QDateTime>
|
||||
#include "../utils.h"
|
||||
|
||||
BookmarkModel::BookmarkModel(QObject* parent):QAbstractTableModel(parent),
|
||||
|
|
|
@ -3591,12 +3591,12 @@ void SynEdit::rescanForFoldRanges()
|
|||
CodeFoldingRanges ranges=mAllFoldRanges;
|
||||
mAllFoldRanges.clear();
|
||||
// Add folds to a separate list
|
||||
PCodeFoldingRanges TemporaryAllFoldRanges = std::make_shared<CodeFoldingRanges>();
|
||||
scanForFoldRanges(TemporaryAllFoldRanges);
|
||||
PCodeFoldingRanges temporaryAllFoldRanges = std::make_shared<CodeFoldingRanges>();
|
||||
scanForFoldRanges(temporaryAllFoldRanges);
|
||||
|
||||
// Combine new with old folds, preserve parent order
|
||||
for (int i = 0; i< TemporaryAllFoldRanges->count();i++) {
|
||||
PCodeFoldingRange tempFoldRange=TemporaryAllFoldRanges->range(i);
|
||||
for (int i = 0; i< temporaryAllFoldRanges->count();i++) {
|
||||
PCodeFoldingRange tempFoldRange=temporaryAllFoldRanges->range(i);
|
||||
int j=0;
|
||||
while (j <ranges.count()) {
|
||||
PCodeFoldingRange foldRange = ranges[j];
|
||||
|
|
|
@ -680,8 +680,7 @@ private:
|
|||
PUndoList mUndoList;
|
||||
PRedoList mRedoList;
|
||||
QPoint mMouseDownPos;
|
||||
bool mHideSelection;
|
||||
int mMouseWheelAccumulator;
|
||||
int mMouseWheelAccumulator;
|
||||
EditCaretType mOverwriteCaret;
|
||||
EditCaretType mInsertCaret;
|
||||
QPoint mCaretOffset;
|
||||
|
|
|
@ -252,7 +252,7 @@ void SynEditTextPainter::computeSelectionInfo()
|
|||
BufferCoord vEnd;
|
||||
bAnySelection = false;
|
||||
// Only if selection is visible anyway.
|
||||
if (!edit->mHideSelection || edit->hasFocus()) {
|
||||
if (edit->hasFocus()) {
|
||||
bAnySelection = true;
|
||||
// Get the *real* start of the selected area.
|
||||
if (edit->mBlockBegin.line < edit->mBlockEnd.line) {
|
||||
|
|
|
@ -94,7 +94,7 @@ int ExecuteCommand(vector<string>& command,bool reInp) {
|
|||
command_begin = 0;
|
||||
}
|
||||
argv = (char * *)malloc(sizeof(char *)*command_size);
|
||||
for (int i=command_begin;i<command.size();i++) {
|
||||
for (size_t i=command_begin;i<command.size();i++) {
|
||||
argv[i-command_begin] = (char *)command[i].c_str();
|
||||
}
|
||||
argv[command.size()-command_begin]=NULL;
|
||||
|
@ -114,6 +114,7 @@ int ExecuteCommand(vector<string>& command,bool reInp) {
|
|||
free(current_dir);
|
||||
exit(-1);
|
||||
}
|
||||
free(argv);
|
||||
} else {
|
||||
int status;
|
||||
pid_t w;
|
||||
|
|
Loading…
Reference in New Issue