Merge branch 'master' into emoji

This commit is contained in:
Roy Qu 2024-02-22 14:48:20 +08:00
commit e3d57e564d
11 changed files with 459 additions and 394 deletions

View File

@ -172,21 +172,17 @@ jobs:
name: Windows MSVC ARM64EC (do not use) name: Windows MSVC ARM64EC (do not use)
path: pkg/ path: pkg/
deb: debian:
name: Deb name: Debian
strategy: strategy:
matrix: matrix:
image: arch: [amd64, i386]
- "debian:10" # oldest LTS version: ["10", "11", "12", sid]
- "ubuntu:23.10" # latest stable
- "debian:sid" # rolling
include: include:
- image: debian:10 - arch: amd64
displayImage: debian-10 platform: linux/amd64
- image: ubuntu:23.10 - arch: i386
displayImage: ubuntu-23.10 platform: linux/386
- image: debian:sid
displayImage: debian-sid
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -195,16 +191,41 @@ jobs:
- name: Fetch container image - name: Fetch container image
run: | run: |
podman pull --platform linux/amd64 docker.io/amd64/${{ matrix.image }} podman pull --platform ${{ matrix.platform }} docker.io/${{ matrix.arch }}/debian:${{ matrix.version }}
- name: Build - name: Build
run: | run: |
podman run --rm -e SOURCE_DIR=/src -v $GITHUB_WORKSPACE:/src --platform linux/amd64 ${{ matrix.image }} /src/packages/debian/01-in-docker.sh podman run --rm -e SOURCE_DIR=/src -v $GITHUB_WORKSPACE:/src --platform linux/amd64 debian:${{ matrix.version }} /src/packages/debian/01-in-docker.sh
- name: Upload - name: Upload
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: Deb - image=${{ matrix.displayImage }} name: Debian ${{ matrix.version }} ${{ matrix.arch }}
path: dist/*.deb
ubuntu:
name: Ubuntu
strategy:
matrix:
version: ["20.04", "22.04", "23.10", "devel"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch container image
run: |
podman pull --platform linux/amd64 docker.io/amd64/ubuntu:${{ matrix.version }}
- name: Build
run: |
podman run --rm -e SOURCE_DIR=/src -v $GITHUB_WORKSPACE:/src --platform linux/amd64 ubuntu:${{ matrix.version }} /src/packages/debian/01-in-docker.sh
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Ubuntu ${{ matrix.version }} amd64
path: dist/*.deb path: dist/*.deb
archlinux: archlinux:

View File

@ -1,3 +1,9 @@
Red Panda C++ Version 2.27
- enhancement: New chinese translation for invalid filename messagebox. (by XY0797@github.com)
- enhancement: Limit the minimum font size in options dialog to 5. (by XY0797@github.com)
- enhancement: After a new file is created in filesystem panel, auto select and rename it. (by XY0797@github.com)
Red Panda C++ Version 2.26 Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors. - enhancement: Code suggestion for embedded std::vectors.
- change: Use ctrl+mouseMove event to highlight jumpable symbols (instead of ctrl+tooltip). - change: Use ctrl+mouseMove event to highlight jumpable symbols (instead of ctrl+tooltip).

View File

@ -15,7 +15,7 @@ CONFIG += ENABLE_SDCC
APP_NAME = RedPandaCPP APP_NAME = RedPandaCPP
APP_VERSION = 2.26 APP_VERSION = 2.27
# TEST_VERSION = beta2 # TEST_VERSION = beta2
system(git rev-list HEAD --count): TEST_VERSION = $$system(git rev-list HEAD --count) system(git rev-list HEAD --count): TEST_VERSION = $$system(git rev-list HEAD --count)

View File

@ -103,6 +103,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
static const char *Translation[] =
{
QT_TRANSLATE_NOOP("QFileSystemModel", "<b>The name \"%1\" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.")
};
static int findTabIndex(QTabWidget* tabWidget , QWidget* w) { static int findTabIndex(QTabWidget* tabWidget , QWidget* w) {
for (int i=0;i<tabWidget->count();i++) { for (int i=0;i<tabWidget->count();i++) {
@ -4433,15 +4437,17 @@ void MainWindow::onShowInsertCodeSnippetMenu()
void MainWindow::onFilesViewCreateFolderFolderLoaded(const QString& path) void MainWindow::onFilesViewCreateFolderFolderLoaded(const QString& path)
{ {
if (mFilesViewNewCreatedFolder.isEmpty()) if (mFilesViewNewCreatedFolder.isEmpty() && mFilesViewNewCreatedFile.isEmpty())
return; return;
if (path!=extractFilePath(mFilesViewNewCreatedFolder)) if (path!=extractFilePath(mFilesViewNewCreatedFolder) && path!=extractFilePath(mFilesViewNewCreatedFile))
return; return;
disconnect(&mFileSystemModel,&QFileSystemModel::directoryLoaded, disconnect(&mFileSystemModel,&QFileSystemModel::directoryLoaded,
this,&MainWindow::onFilesViewCreateFolderFolderLoaded); this,&MainWindow::onFilesViewCreateFolderFolderLoaded);
QModelIndex newIndex = mFileSystemModel.index(mFilesViewNewCreatedFolder);
QModelIndex newIndex = mFileSystemModel.index(mFilesViewNewCreatedFolder.isEmpty() ? mFilesViewNewCreatedFile : mFilesViewNewCreatedFolder);
if (newIndex.isValid()) { if (newIndex.isValid()) {
ui->treeFiles->setCurrentIndex(newIndex); ui->treeFiles->setCurrentIndex(newIndex);
ui->treeFiles->edit(newIndex); ui->treeFiles->edit(newIndex);
@ -4499,7 +4505,6 @@ void MainWindow::onFilesViewCreateFile()
dir = QDir(mFileSystemModel.fileInfo(index).absoluteFilePath()); dir = QDir(mFileSystemModel.fileInfo(index).absoluteFilePath());
else else
dir = mFileSystemModel.fileInfo(index).absoluteDir(); dir = mFileSystemModel.fileInfo(index).absoluteDir();
ui->treeFiles->expand(index);
} else { } else {
dir = mFileSystemModel.rootDirectory(); dir = mFileSystemModel.rootDirectory();
} }
@ -4521,8 +4526,12 @@ void MainWindow::onFilesViewCreateFile()
// workaround: try create but do not truncate // workaround: try create but do not truncate
file.open(QFile::ReadWrite); file.open(QFile::ReadWrite);
#endif #endif
QModelIndex newIndex = mFileSystemModel.index(fileName); file.close();
ui->treeFiles->setCurrentIndex(newIndex); QModelIndex newIndex = mFileSystemModel.index(dir.filePath(fileName));
connect(&mFileSystemModel,&QFileSystemModel::directoryLoaded,
this,&MainWindow::onFilesViewCreateFolderFolderLoaded);
ui->treeFiles->expand(index);
mFilesViewNewCreatedFile=mFileSystemModel.filePath(newIndex);
} }

View File

@ -906,6 +906,7 @@ private:
QString mClassBrowserCurrentStatement; QString mClassBrowserCurrentStatement;
QString mFilesViewNewCreatedFolder; QString mFilesViewNewCreatedFolder;
QString mFilesViewNewCreatedFile;
bool mCheckSyntaxInBack; bool mCheckSyntaxInBack;
bool mShouldRemoveAllSettings; bool mShouldRemoveAllSettings;

View File

@ -95,7 +95,11 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QSpinBox" name="spinFontSize"/> <widget class="QSpinBox" name="spinFontSize">
<property name="minimum">
<number>5</number>
</property>
</widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">

View File

@ -6476,6 +6476,13 @@
<translation type="obsolete">Configurações</translation> <translation type="obsolete">Configurações</translation>
</message> </message>
</context> </context>
<context>
<name>QFileSystemModel</name>
<message>
<source>&lt;b&gt;The name &quot;%1&quot; cannot be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuation marks.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>

File diff suppressed because it is too large Load Diff

View File

@ -6120,6 +6120,13 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>QFileSystemModel</name>
<message>
<source>&lt;b&gt;The name &quot;%1&quot; cannot be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuation marks.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>

View File

@ -21,7 +21,7 @@ qsynedit.depends = redpanda_qt_utils
APP_NAME = RedPandaCPP APP_NAME = RedPandaCPP
APP_VERSION = 2.26 APP_VERSION = 2.27
win32: { win32: {
SUBDIRS += \ SUBDIRS += \

View File

@ -11,7 +11,8 @@ ifeq ($(DEB_HOST_ARCH), amd64)
MINGW_UTF8_OBJS = x86_64-w64-mingw32/utf8init.o i686-w64-mingw32/utf8init.o x86_64-w64-mingw32/utf8manifest.o i686-w64-mingw32/utf8manifest.o MINGW_UTF8_OBJS = x86_64-w64-mingw32/utf8init.o i686-w64-mingw32/utf8init.o x86_64-w64-mingw32/utf8manifest.o i686-w64-mingw32/utf8manifest.o
execute_after_dh_auto_build: $(MINGW_UTF8_OBJS) override_dh_auto_build: $(MINGW_UTF8_OBJS)
dh_auto_build -O--buildsystem qmake
x86_64-w64-mingw32/utf8init.o: platform/windows/utf8/utf8init.cpp x86_64-w64-mingw32/utf8init.o: platform/windows/utf8/utf8init.cpp
mkdir -p $(dir $@) mkdir -p $(dir $@)
@ -29,7 +30,8 @@ i686-w64-mingw32/utf8manifest.o: platform/windows/utf8/utf8manifest.rc
mkdir -p $(dir $@) mkdir -p $(dir $@)
i686-w64-mingw32-windres -O coff -o $@ $< i686-w64-mingw32-windres -O coff -o $@ $<
execute_after_dh_install: override_dh_auto_install:
dh_auto_install -O--buildsystem=qmake
dh_install debian/compiler_hint.lua usr/libexec/RedPandaCPP dh_install debian/compiler_hint.lua usr/libexec/RedPandaCPP
dh_install x86_64-w64-mingw32/* usr/libexec/RedPandaCPP/x86_64-w64-mingw32 dh_install x86_64-w64-mingw32/* usr/libexec/RedPandaCPP/x86_64-w64-mingw32
dh_install i686-w64-mingw32/* usr/libexec/RedPandaCPP/i686-w64-mingw32 dh_install i686-w64-mingw32/* usr/libexec/RedPandaCPP/i686-w64-mingw32