- enhancement: Auto create project custom executable folder if not existing.

This commit is contained in:
Roy Qu 2023-02-18 12:54:28 +08:00
parent 24734bfb28
commit 96aa836040
5 changed files with 28 additions and 18 deletions

View File

@ -41,8 +41,7 @@ Red Panda C++ Version 2.12
- enhancement: If executable doesn't have symbol table, inform user and stop. - enhancement: If executable doesn't have symbol table, inform user and stop.
- enhancement: If breakpoint is setted but executable doesn't have debug info inform user and stop. - enhancement: If breakpoint is setted but executable doesn't have debug info inform user and stop.
- enhancement: If current compiler set has "strip addition infos(-s)" enabled, inform user and stop. - enhancement: If current compiler set has "strip addition infos(-s)" enabled, inform user and stop.
- enhancement: Auto create project custom executable folder if not existing.
Red Panda C++ Version 2.11 Red Panda C++ Version 2.11

View File

@ -35,7 +35,6 @@ void ProjectCompiler::buildMakeFile()
//we are using custom make file, don't overwrite it //we are using custom make file, don't overwrite it
if (mProject->options().useCustomMakefile && !mProject->options().customMakefile.isEmpty()) if (mProject->options().useCustomMakefile && !mProject->options().customMakefile.isEmpty())
return; return;
switch(mProject->options().type) { switch(mProject->options().type) {
case ProjectType::StaticLib: case ProjectType::StaticLib:
createStaticMakeFile(); createStaticMakeFile();
@ -95,7 +94,10 @@ void ProjectCompiler::newMakeFile(QFile& file)
if (!mProject->options().objectOutput.isEmpty()) { if (!mProject->options().objectOutput.isEmpty()) {
QDir(mProject->directory()).mkpath(mProject->options().objectOutput); QDir(mProject->directory()).mkpath(mProject->options().objectOutput);
} }
// Create executable output directory
if (!mProject->options().exeOutput.isEmpty()) {
QDir(mProject->directory()).mkpath(mProject->options().exeOutput);
}
// Write more information to the log file than before // Write more information to the log file than before
log(tr("Building makefile...")); log(tr("Building makefile..."));
log("--------"); log("--------");

View File

@ -623,6 +623,9 @@ void Editor::wheelEvent(QWheelEvent *event) {
if ( (event->modifiers() & Qt::ControlModifier)!=0) { if ( (event->modifiers() & Qt::ControlModifier)!=0) {
int size = pSettings->editor().fontSize(); int size = pSettings->editor().fontSize();
int oldSize = size; int oldSize = size;
if ( (mWheelAccumulatedDelta>0 &&event->angleDelta().y()<0)
|| (mWheelAccumulatedDelta<0 &&event->angleDelta().y()>0))
mWheelAccumulatedDelta=0;
mWheelAccumulatedDelta+=event->angleDelta().y(); mWheelAccumulatedDelta+=event->angleDelta().y();
while (mWheelAccumulatedDelta>=120) { while (mWheelAccumulatedDelta>=120) {
mWheelAccumulatedDelta-=120; mWheelAccumulatedDelta-=120;

View File

@ -45,8 +45,8 @@ namespace QSynedit {
QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent), QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent),
mEditingCount{0}, mEditingCount{0},
mDropped{false}, mDropped{false},
mWheelAccumlatedDeltaX{0}, mWheelAccumulatedDeltaX{0},
mWheelAccumlatedDeltaY{0} mWheelAccumulatedDeltaY{0}
{ {
mCharWidth=1; mCharWidth=1;
mTextHeight = 1; mTextHeight = 1;
@ -6346,23 +6346,29 @@ void QSynEdit::leaveEvent(QEvent *)
void QSynEdit::wheelEvent(QWheelEvent *event) void QSynEdit::wheelEvent(QWheelEvent *event)
{ {
if (event->modifiers() == Qt::ShiftModifier) { if (event->modifiers() == Qt::ShiftModifier) {
mWheelAccumlatedDeltaX+=event->angleDelta().y(); if ( (mWheelAccumulatedDeltaX>0 &&event->angleDelta().y()<0)
while (mWheelAccumlatedDeltaX>=120) { || (mWheelAccumulatedDeltaX<0 &&event->angleDelta().y()>0))
mWheelAccumlatedDeltaX-=120; mWheelAccumulatedDeltaX=0;
mWheelAccumulatedDeltaX+=event->angleDelta().y();
while (mWheelAccumulatedDeltaX>=120) {
mWheelAccumulatedDeltaX-=120;
horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed); horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed);
} }
while (mWheelAccumlatedDeltaX<=-120) { while (mWheelAccumulatedDeltaX<=-120) {
mWheelAccumlatedDeltaX+=120; mWheelAccumulatedDeltaX+=120;
horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed); horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed);
} }
} else { } else {
mWheelAccumlatedDeltaY+=event->angleDelta().y(); if ( (mWheelAccumulatedDeltaY>0 &&event->angleDelta().y()<0)
while (mWheelAccumlatedDeltaY>=120) { || (mWheelAccumulatedDeltaY<0 &&event->angleDelta().y()>0))
mWheelAccumlatedDeltaY-=120; mWheelAccumulatedDeltaY=0;
mWheelAccumulatedDeltaY+=event->angleDelta().y();
while (mWheelAccumulatedDeltaY>=120) {
mWheelAccumulatedDeltaY-=120;
verticalScrollBar()->setValue(verticalScrollBar()->value()-mMouseWheelScrollSpeed); verticalScrollBar()->setValue(verticalScrollBar()->value()-mMouseWheelScrollSpeed);
} }
while (mWheelAccumlatedDeltaY<=-120) { while (mWheelAccumulatedDeltaY<=-120) {
mWheelAccumlatedDeltaY+=120; mWheelAccumulatedDeltaY+=120;
verticalScrollBar()->setValue(verticalScrollBar()->value()+mMouseWheelScrollSpeed); verticalScrollBar()->setValue(verticalScrollBar()->value()+mMouseWheelScrollSpeed);
} }
} }

View File

@ -744,8 +744,8 @@ private:
BufferCoord mDragSelBeginSave; BufferCoord mDragSelBeginSave;
BufferCoord mDragSelEndSave; BufferCoord mDragSelEndSave;
bool mDropped; bool mDropped;
int mWheelAccumlatedDeltaX; int mWheelAccumulatedDeltaX;
int mWheelAccumlatedDeltaY; int mWheelAccumulatedDeltaY;
friend class QSynEditPainter; friend class QSynEditPainter;