From 05a36d3ed177afdda817a6f1f45703d8c12884e0 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 11 Apr 2024 08:09:43 +0800 Subject: [PATCH] Dont auto scroll when copy by drag & drop --- RedPandaIDE/compiler/projectcompiler.cpp | 2 +- RedPandaIDE/mainwindow.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index f01288d2..82277466 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -478,7 +478,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) if (sourceEncoding==ENCODING_SYSTEM_DEFAULT) sourceEncoding = defaultSystemEncoding; - if (sourceEncoding!=targetEncoding) { + if (QString::compare(sourceEncoding,targetEncoding,Qt::CaseInsensitive)!=0) { encodingStr = QString(" -finput-charset=%1 -fexec-charset=%2") .arg(QString(sourceEncoding), QString(targetEncoding)); diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index b875b9b4..3ee5eefa 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -399,10 +399,10 @@ MainWindow::MainWindow(QWidget *parent) m=ui->treeFiles->selectionModel(); ui->treeFiles->setModel(&mFileSystemModel); delete m; - connect(&mFileSystemModel, &QFileSystemModel::layoutChanged, - this, &MainWindow::onFileSystemModelLayoutChanged, Qt::QueuedConnection); - connect(&mFileSystemModel, &QFileSystemModel::fileRenamed, - this, &MainWindow::onFileSystemModelLayoutChanged, Qt::QueuedConnection); + // connect(&mFileSystemModel, &QFileSystemModel::layoutChanged, + // this, &MainWindow::onFileSystemModelLayoutChanged, Qt::QueuedConnection); + // connect(&mFileSystemModel, &QFileSystemModel::fileRenamed, + // this, &MainWindow::onFileSystemModelLayoutChanged, Qt::QueuedConnection); connect(&mFileSystemModel, &QFileSystemModel::fileRenamed, this, &MainWindow::onFileRenamedInFileSystemModel); mFileSystemModel.setReadOnly(false);