- enhancement: Auto backup editing contents. (Save editing contents 3 seconds after input stopped. Auto delete when editor successfully closed)

- enhancement: Add "Auto backup editing contents" option in options/editor/auto save
This commit is contained in:
Roy Qu 2023-01-15 13:32:33 +08:00
parent edeb47d2c2
commit aa62f95cad
13 changed files with 417 additions and 179 deletions

View File

@ -5,6 +5,8 @@ Red Panda C++ Version 2.9
- fix: Save may crash app if the encoding codec is failed to load.
- enhancement: support open and save utf-16/utf-32 BOM files. (but gcc can't compile)
- enhancement: Create a temporary copy of the current file when saving files (it's removed after the saving sucessfully finished).
- enhancement: Auto backup editing contents. (Save editing contents 3 seconds after input stopped. Auto delete when editor successfully closed)
- enhancement: Add "Auto backup editing contents" option in options/editor/auto save
Red Panda C++ Version 2.8

View File

@ -29,6 +29,7 @@
#include <QMessageBox>
#include <QDebug>
#include <QMimeData>
#include <QTemporaryFile>
#include "qsynedit/syntaxer/cpp.h"
#include "syntaxermanager.h"
#include "qsynedit/exporter/rtfexporter.h"
@ -83,6 +84,7 @@ Editor::Editor(QWidget *parent, const QString& filename,
mSaving(false),
mHoverModifiedLine(-1)
{
mBackupFile=nullptr;
mHighlightCharPos1 = QSynedit::BufferCoord{0,0};
mHighlightCharPos2 = QSynedit::BufferCoord{0,0};
mCurrentLineModified = false;
@ -93,7 +95,13 @@ Editor::Editor(QWidget *parent, const QString& filename,
QFileInfo fileInfo(mFilename);
QSynedit::PSyntaxer syntaxer;
if (!isNew) {
loadFile();
try {
loadFile();
} catch (FileError& e) {
QMessageBox::critical(nullptr,
tr("Error Load File"),
e.reason());
}
syntaxer = syntaxerManager.getSyntaxer(mFilename);
} else {
mFileEncoding = ENCODING_ASCII;
@ -176,9 +184,13 @@ Editor::Editor(QWidget *parent, const QString& filename,
setExtraKeystrokes();
}
if (mParentPageControl)
if (mParentPageControl) {
connect(&mFunctionTipTimer, &QTimer::timeout,
this, &Editor::onFunctionTipsTimer);
mAutoBackupTimer.setInterval(1);
connect(&mAutoBackupTimer, &QTimer::timeout,
this, &Editor::onAutoBackupTimer);
}
connect(horizontalScrollBar(), &QScrollBar::valueChanged,
this, &Editor::onScrollBarValueChanged);
@ -188,15 +200,33 @@ Editor::Editor(QWidget *parent, const QString& filename,
Editor::~Editor() {
//qDebug()<<"editor "<<mFilename<<" deleted";
cleanAutoBackup();
}
void Editor::loadFile(QString filename) {
if (filename.isEmpty()) {
this->document()->loadFromFile(mFilename,mEncodingOption,mFileEncoding);
filename=mFilename;
for (int i=0;i<100;i++) {
QString backfilename = filename+".savebak";
if (i>0)
backfilename += QString("%1").arg(i);
if (fileExists(backfilename)) {
if (QMessageBox::question(this,tr("Restore backup"),
tr("Backup file '%1' detected.").arg(backfilename)
+"<br />"
+tr("Error occurred at last save.")
+"<br />"
+tr("Do you want to load the backup file?"),
QMessageBox::Yes | QMessageBox::No)==QMessageBox::Yes)
filename = backfilename;
break;
}
}
} else {
filename = QFileInfo(filename).absoluteFilePath();
this->document()->loadFromFile(filename,mEncodingOption,mFileEncoding);
}
this->document()->loadFromFile(filename,mEncodingOption,mFileEncoding);
//this->setModified(false);
updateCaption();
if (mParentPageControl)
@ -219,6 +249,7 @@ void Editor::loadFile(QString filename) {
reparseTodo();
}
mLastIdCharPressed = 0;
saveAutoBackup();
}
void Editor::saveFile(QString filename) {
@ -450,6 +481,8 @@ bool Editor::saveAs(const QString &name, bool fromProject){
updateCaption();
emit renamed(oldName, newName , firstSave);
initAutoBackup();
return true;
}
@ -467,9 +500,15 @@ void Editor::setEncodingOption(const QByteArray& encoding) noexcept{
if (mEncodingOption == encoding)
return;
mEncodingOption = encoding;
if (!isNew())
loadFile();
else if (mParentPageControl)
if (!isNew()) {
try {
loadFile();
} catch (FileError& e) {
QMessageBox::critical(nullptr,
tr("Error Load File"),
e.reason());
}
} else if (mParentPageControl)
pMainWindow->updateForEncodingInfo(this);
if (mProject) {
PProjectUnit unit = mProject->findUnit(this);
@ -1800,8 +1839,6 @@ void Editor::onStatusChanged(QSynedit::StatusChanges changes)
}
}
if (changes.testFlag(QSynedit::scInsertMode) | changes.testFlag(QSynedit::scReadOnly))
pMainWindow->updateForStatusbarModeInfo();
@ -1866,6 +1903,16 @@ void Editor::onFunctionTipsTimer()
updateFunctionTip(true);
}
void Editor::onAutoBackupTimer()
{
if (mBackupTime>lastModifyTime())
return;
QDateTime current=QDateTime::currentDateTime();
if (current.toSecsSinceEpoch()-lastModifyTime().toSecsSinceEpoch()<3)
return;
saveAutoBackup();
}
bool Editor::isBraceChar(QChar ch)
{
switch( ch.unicode()) {
@ -3268,6 +3315,61 @@ void Editor::showHeaderCompletion(bool autoComplete, bool forceShow)
headerCompletionInsert(); // if only have one suggestion, just use it
}
void Editor::initAutoBackup()
{
if (!mParentPageControl)
return;
cleanAutoBackup();
if (!pSettings->editor().enableEditTempBackup())
return;
QFileInfo fileInfo(mFilename);
if (fileInfo.isAbsolute()) {
mBackupFile=new QFile(extractFileDir(mFilename)
+QDir::separator()
+extractFileName(mFilename)+QString(".%1.editbackup").arg(QDateTime::currentSecsSinceEpoch()));
if (mBackupFile->open(QFile::Truncate|QFile::WriteOnly)) {
saveAutoBackup();
} else {
cleanAutoBackup();
}
} else {
mBackupFile=new QFile(
includeTrailingPathDelimiter(QDir::currentPath())
+mFilename
+QString(".%1.editbackup").arg(QDateTime::currentSecsSinceEpoch()));
if (!mBackupFile->open(QFile::Truncate|QFile::WriteOnly)) {
mBackupFile->setParent(nullptr);
delete mBackupFile;
mBackupFile=nullptr;
}
}
if (mBackupFile) {
mAutoBackupTimer.start();
}
}
void Editor::saveAutoBackup()
{
if (mBackupFile) {
mBackupFile->reset();
mBackupTime=QDateTime::currentDateTime();
mBackupFile->write(text().toUtf8());
mBackupFile->flush();
qDebug()<<mBackupTime<<mBackupFile->size()<<mBackupFile->fileName();
}
}
void Editor::cleanAutoBackup()
{
mAutoBackupTimer.stop();
if (mBackupFile) {
mBackupFile->close();
mBackupFile->remove();
delete mBackupFile;
mBackupFile=nullptr;
}
}
bool Editor::testInFunc(int x, int y)
{
bool result = false;
@ -4841,6 +4943,8 @@ void Editor::applySettings()
this->setUndoLimit(pSettings->editor().undoLimit());
this->setUndoMemoryUsage(pSettings->editor().undoMemoryUsage());
initAutoBackup();
setMouseWheelScrollSpeed(pSettings->editor().mouseWheelScrollSpeed());
setMouseSelectionScrollSpeed(pSettings->editor().mouseSelectionScrollSpeed());
invalidate();

View File

@ -39,6 +39,8 @@ struct TabStop {
int y;
};
class QTemporaryFile;
using PTabStop = std::shared_ptr<TabStop>;
class Editor : public QSynedit::QSynEdit
@ -228,6 +230,7 @@ private slots:
void onLinesDeleted(int first,int count);
void onLinesInserted(int first,int count);
void onFunctionTipsTimer();
void onAutoBackupTimer();
private:
bool isBraceChar(QChar ch);
@ -254,6 +257,10 @@ private:
void showCompletion(const QString& preWord, bool autoComplete, CodeCompletionType type);
void showHeaderCompletion(bool autoComplete, bool forceShow=false);
void initAutoBackup();
void saveAutoBackup();
void cleanAutoBackup();
bool testInFunc(int x,int y);
void completionInsert(bool appendFunc=false);
@ -281,6 +288,8 @@ private:
void onScrollBarValueChanged();
static PCppParser sharedParser(ParserLanguage language);
private:
QDateTime mBackupTime;
QFile* mBackupFile;
QByteArray mEncodingOption; // the encoding type set by the user
QByteArray mFileEncoding; // the real encoding of the file (auto detected)
QString mFilename;
@ -328,6 +337,7 @@ private:
QSynedit::BufferCoord mHighlightCharPos2;
std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > mStatementColors;
QTimer mFunctionTipTimer;
QTimer mAutoBackupTimer;
int mHoverModifiedLine;
static QHash<ParserLanguage,std::weak_ptr<CppParser>> mSharedParsers;

View File

@ -760,6 +760,16 @@ void Settings::Editor::setShowLeadingSpaces(bool newShowStartSpaces)
mShowLeadingSpaces = newShowStartSpaces;
}
bool Settings::Editor::enableEditTempBackup() const
{
return mEnableEditTempBackup;
}
void Settings::Editor::setEnableEditTempBackup(bool newEnableEditTempBackup)
{
mEnableEditTempBackup = newEnableEditTempBackup;
}
bool Settings::Editor::showTrailingSpaces() const
{
return mShowTrailingSpaces;
@ -1360,6 +1370,7 @@ void Settings::Editor::doSave()
saveValue("check_syntax_when_line_changed",mSyntaxCheckWhenLineChanged);
//auto save
saveValue("enable_edit_temp_backup",mEnableEditTempBackup);
saveValue("enable_auto_save",mEnableAutoSave);
saveValue("auto_save_interal",mAutoSaveInterval);
saveValue("auto_save_target",mAutoSaveTarget);
@ -1508,6 +1519,7 @@ void Settings::Editor::doLoad()
mSyntaxCheckWhenLineChanged = boolValue("check_syntax_when_line_changed",true);
//auto save
mEnableEditTempBackup = boolValue("enable_edit_temp_backup",true);
mEnableAutoSave = boolValue("enable_auto_save",false);
mAutoSaveInterval = intValue("auto_save_interal",10);
mAutoSaveTarget = static_cast<enum AutoSaveTarget>(

View File

@ -398,6 +398,9 @@ public:
bool showLeadingSpaces() const;
void setShowLeadingSpaces(bool newShowStartSpaces);
bool enableEditTempBackup() const;
void setEnableEditTempBackup(bool newEnableEditTempBackup);
private:
//General
// indents
@ -497,6 +500,7 @@ public:
bool mSyntaxCheckWhenLineChanged;
//auto save
bool mEnableEditTempBackup;
bool mEnableAutoSave;
int mAutoSaveInterval;
enum AutoSaveTarget mAutoSaveTarget;

View File

@ -48,8 +48,7 @@ void EditorAutoSaveWidget::onAutoSaveStrategyChanged()
void EditorAutoSaveWidget::doLoad()
{
//pSettings->editor().load();
//font
ui->chkAutoBackupEditContents->setChecked(pSettings->editor().enableEditTempBackup());
ui->grpEnableAutoSave->setChecked(pSettings->editor().enableAutoSave());
ui->spinInterval->setValue(pSettings->editor().autoSaveInterval());
switch(pSettings->editor().autoSaveTarget()) {
@ -76,6 +75,7 @@ void EditorAutoSaveWidget::doLoad()
void EditorAutoSaveWidget::doSave()
{
pSettings->editor().setEnableEditTempBackup(ui->chkAutoBackupEditContents->isChecked());
pSettings->editor().setEnableAutoSave(ui->grpEnableAutoSave->isChecked());
pSettings->editor().setAutoSaveInterval(ui->spinInterval->value());
if (ui->rbCurrentFile->isChecked())

View File

@ -14,6 +14,13 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="chkAutoBackupEditContents">
<property name="text">
<string>Auto backup editing contents</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="grpEnableAutoSave">
<property name="title">

View File

@ -1038,6 +1038,30 @@
<source>Can&apos;t generate temporary backup file &apos;%1&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore backup</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Backup file &apos;%1&apos; detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Continue to save?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error occurred at last save.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you want to load the backup file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error Load File</source>
<translation type="unfinished">Erro ao carregar arquivo</translation>
</message>
</context>
<context>
<name>EditorAutoSaveWidget</name>
@ -1097,6 +1121,10 @@
<source>Demo file name: </source>
<translation>Nome do arquivo de demonstração:</translation>
</message>
<message>
<source>Auto backup editing contents</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditorClipboardWidget</name>

View File

@ -1379,14 +1379,15 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../editor.cpp" line="254"/>
<location filename="../editor.cpp" line="297"/>
<location filename="../editor.cpp" line="383"/>
<location filename="../editor.cpp" line="412"/>
<location filename="../editor.cpp" line="1482"/>
<location filename="../editor.cpp" line="1487"/>
<location filename="../editor.cpp" line="1507"/>
<location filename="../editor.cpp" line="1512"/>
<location filename="../editor.cpp" line="268"/>
<location filename="../editor.cpp" line="276"/>
<location filename="../editor.cpp" line="322"/>
<location filename="../editor.cpp" line="408"/>
<location filename="../editor.cpp" line="437"/>
<location filename="../editor.cpp" line="1515"/>
<location filename="../editor.cpp" line="1520"/>
<location filename="../editor.cpp" line="1540"/>
<location filename="../editor.cpp" line="1545"/>
<source>Error</source>
<translation></translation>
</message>
@ -1395,49 +1396,82 @@ Are you really want to continue?</oldsource>
<translation type="vanished">&quot;%1&quot;</translation>
</message>
<message>
<location filename="../editor.cpp" line="255"/>
<source>Can&apos;t generate temporary backup file &apos;%1&apos;.</source>
<translation type="unfinished">&quot;%1&quot;</translation>
<location filename="../editor.cpp" line="102"/>
<location filename="../editor.cpp" line="508"/>
<source>Error Load File</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="327"/>
<location filename="../editor.cpp" line="214"/>
<source>Restore backup</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="215"/>
<source>Backup file &apos;%1&apos; detected.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../editor.cpp" line="217"/>
<source>Error occurred at last save.</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="219"/>
<source>Do you want to load the backup file?</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="269"/>
<location filename="../editor.cpp" line="277"/>
<source>Can&apos;t generate temporary backup file &apos;%1&apos;.</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="../editor.cpp" line="271"/>
<location filename="../editor.cpp" line="279"/>
<source>Continue to save?</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="352"/>
<source>Save As</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="384"/>
<location filename="../editor.cpp" line="409"/>
<source>File %1 already openned!</source>
<translation>%1</translation>
</message>
<message>
<location filename="../editor.cpp" line="1483"/>
<location filename="../editor.cpp" line="1516"/>
<source>The text to be copied exceeds count limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1488"/>
<location filename="../editor.cpp" line="1521"/>
<source>The text to be copied exceeds character limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1508"/>
<location filename="../editor.cpp" line="1541"/>
<source>The text to be cut exceeds count limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1513"/>
<location filename="../editor.cpp" line="1546"/>
<source>The text to be cut exceeds character limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="2995"/>
<location filename="../editor.cpp" line="3036"/>
<source>Print Document</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="3630"/>
<location filename="../editor.cpp" line="3677"/>
<location filename="../editor.cpp" line="3722"/>
<location filename="../editor.cpp" line="3725"/>
<location filename="../editor.cpp" line="3772"/>
<location filename="../editor.cpp" line="3817"/>
<source>Ctrl+click for more info</source>
<translation>Ctrl+</translation>
</message>
@ -1446,27 +1480,27 @@ Are you really want to continue?</oldsource>
<translation type="vanished">&apos;%1&apos;!</translation>
</message>
<message>
<location filename="../editor.cpp" line="4561"/>
<location filename="../editor.cpp" line="4656"/>
<source>astyle not found</source>
<translation>astyle程序</translation>
</message>
<message>
<location filename="../editor.cpp" line="4562"/>
<location filename="../editor.cpp" line="4657"/>
<source>Can&apos;t find astyle in &quot;%1&quot;.</source>
<translation>astyle程序&quot;%1&quot;.</translation>
</message>
<message>
<location filename="../editor.cpp" line="4721"/>
<location filename="../editor.cpp" line="4816"/>
<source>Break point condition</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="4722"/>
<location filename="../editor.cpp" line="4817"/>
<source>Enter the condition of the breakpoint:</source>
<translation>:</translation>
</message>
<message>
<location filename="../editor.cpp" line="4965"/>
<location filename="../editor.cpp" line="5062"/>
<source>Readonly</source>
<translation></translation>
</message>
@ -1480,61 +1514,66 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="20"/>
<source>Auto backup editing contents</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="27"/>
<source>Enable auto save</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="44"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="51"/>
<source>Time interval:</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="51"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="58"/>
<source>minutes</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="80"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="87"/>
<source>Objects to save</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="86"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="93"/>
<source>Current File</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="93"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="100"/>
<source>All files openned</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="100"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="107"/>
<source>Project files</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="110"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="117"/>
<source>Save strategy</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="116"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="123"/>
<source>Overwrite</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="123"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="130"/>
<source>Append UNIX timestamp</source>
<translation>Unix时间戳</translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="130"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="137"/>
<source>Append formatted timestamp</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/editorautosavewidget.ui" line="140"/>
<location filename="../settingsdialog/editorautosavewidget.ui" line="147"/>
<source>Demo file name:</source>
<translation></translation>
</message>
@ -4125,11 +4164,11 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.ui" line="947"/>
<location filename="../mainwindow.ui" line="2968"/>
<location filename="../mainwindow.cpp" line="5496"/>
<location filename="../mainwindow.cpp" line="5499"/>
<location filename="../mainwindow.cpp" line="5503"/>
<location filename="../mainwindow.cpp" line="5506"/>
<location filename="../mainwindow.cpp" line="7644"/>
<location filename="../mainwindow.cpp" line="5488"/>
<location filename="../mainwindow.cpp" line="5491"/>
<location filename="../mainwindow.cpp" line="5495"/>
<location filename="../mainwindow.cpp" line="5498"/>
<location filename="../mainwindow.cpp" line="7636"/>
<source>Issues</source>
<translation></translation>
</message>
@ -4567,7 +4606,7 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.ui" line="777"/>
<location filename="../mainwindow.ui" line="780"/>
<location filename="../mainwindow.cpp" line="2463"/>
<location filename="../mainwindow.cpp" line="8081"/>
<location filename="../mainwindow.cpp" line="8073"/>
<source>New Problem Set</source>
<translation></translation>
</message>
@ -4589,7 +4628,7 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.ui" line="819"/>
<location filename="../mainwindow.ui" line="822"/>
<location filename="../mainwindow.cpp" line="2477"/>
<location filename="../mainwindow.cpp" line="8142"/>
<location filename="../mainwindow.cpp" line="8134"/>
<source>Save Problem Set</source>
<translation></translation>
</message>
@ -4597,7 +4636,7 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.ui" line="833"/>
<location filename="../mainwindow.ui" line="836"/>
<location filename="../mainwindow.cpp" line="2484"/>
<location filename="../mainwindow.cpp" line="8178"/>
<location filename="../mainwindow.cpp" line="8170"/>
<source>Load Problem Set</source>
<translation></translation>
</message>
@ -4728,14 +4767,14 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.ui" line="847"/>
<location filename="../mainwindow.cpp" line="2490"/>
<location filename="../mainwindow.cpp" line="9294"/>
<location filename="../mainwindow.cpp" line="9286"/>
<source>Import FPS Problem Set</source>
<translation>FPS试题集</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="858"/>
<location filename="../mainwindow.cpp" line="2496"/>
<location filename="../mainwindow.cpp" line="9325"/>
<location filename="../mainwindow.cpp" line="9317"/>
<source>Export FPS Problem Set</source>
<translation>FPS试题集</translation>
</message>
@ -4977,7 +5016,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.ui" line="2634"/>
<location filename="../mainwindow.cpp" line="6445"/>
<location filename="../mainwindow.cpp" line="6437"/>
<source>Clear all breakpoints</source>
<translation></translation>
</message>
@ -5229,7 +5268,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.ui" line="2797"/>
<location filename="../mainwindow.cpp" line="7587"/>
<location filename="../mainwindow.cpp" line="7579"/>
<source>Rename Symbol</source>
<translation></translation>
</message>
@ -5250,13 +5289,13 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.ui" line="2817"/>
<location filename="../mainwindow.cpp" line="7853"/>
<location filename="../mainwindow.cpp" line="7845"/>
<source>Export As RTF</source>
<translation>RTF</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="2822"/>
<location filename="../mainwindow.cpp" line="7875"/>
<location filename="../mainwindow.cpp" line="7867"/>
<source>Export As HTML</source>
<translation>HTML</translation>
</message>
@ -5629,22 +5668,22 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.cpp" line="2075"/>
<location filename="../mainwindow.cpp" line="2241"/>
<location filename="../mainwindow.cpp" line="5574"/>
<location filename="../mainwindow.cpp" line="5581"/>
<location filename="../mainwindow.cpp" line="5566"/>
<location filename="../mainwindow.cpp" line="5573"/>
<source>Wrong Compiler Settings</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="2076"/>
<location filename="../mainwindow.cpp" line="2242"/>
<location filename="../mainwindow.cpp" line="5575"/>
<location filename="../mainwindow.cpp" line="5582"/>
<location filename="../mainwindow.cpp" line="5567"/>
<location filename="../mainwindow.cpp" line="5574"/>
<source>Compiler is set not to generate executable.</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="2077"/>
<location filename="../mainwindow.cpp" line="5576"/>
<location filename="../mainwindow.cpp" line="5568"/>
<source>We need the executabe to run problem case.</source>
<translation></translation>
</message>
@ -5710,7 +5749,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.cpp" line="2243"/>
<location filename="../mainwindow.cpp" line="5583"/>
<location filename="../mainwindow.cpp" line="5575"/>
<source>Please correct this before start debugging</source>
<translation></translation>
</message>
@ -5768,22 +5807,22 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9193"/>
<location filename="../mainwindow.cpp" line="9185"/>
<source>Go to Line</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9193"/>
<location filename="../mainwindow.cpp" line="9185"/>
<source>Line</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9215"/>
<location filename="../mainwindow.cpp" line="9207"/>
<source>Template Exists</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9216"/>
<location filename="../mainwindow.cpp" line="9208"/>
<source>Template %1 already exists. Do you want to overwrite?</source>
<translation>%1</translation>
</message>
@ -5809,7 +5848,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.cpp" line="327"/>
<location filename="../mainwindow.cpp" line="8090"/>
<location filename="../mainwindow.cpp" line="8082"/>
<source>Problem Set %1</source>
<translation>%1</translation>
</message>
@ -5883,15 +5922,15 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.cpp" line="4386"/>
<location filename="../mainwindow.cpp" line="7939"/>
<location filename="../mainwindow.cpp" line="7981"/>
<location filename="../mainwindow.cpp" line="7931"/>
<location filename="../mainwindow.cpp" line="7973"/>
<source>Bookmark Description</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="4387"/>
<location filename="../mainwindow.cpp" line="7940"/>
<location filename="../mainwindow.cpp" line="7982"/>
<location filename="../mainwindow.cpp" line="7932"/>
<location filename="../mainwindow.cpp" line="7974"/>
<source>Description:</source>
<translation></translation>
</message>
@ -6072,7 +6111,7 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.cpp" line="2801"/>
<location filename="../mainwindow.cpp" line="4267"/>
<location filename="../mainwindow.cpp" line="4273"/>
<location filename="../mainwindow.cpp" line="7179"/>
<location filename="../mainwindow.cpp" line="7171"/>
<source>Delete</source>
<translation></translation>
</message>
@ -6136,17 +6175,17 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9296"/>
<location filename="../mainwindow.cpp" line="9288"/>
<source>FPS Problem Set Files (*.fps;*.xml)</source>
<translation>FPS试题集文件(*.fps;*.xml)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9327"/>
<location filename="../mainwindow.cpp" line="9319"/>
<source>FPS Problem Set Files (*.fps)</source>
<translation>FPS试题集文件(*.fps)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9332"/>
<location filename="../mainwindow.cpp" line="9324"/>
<source>Export Error</source>
<translation></translation>
</message>
@ -6190,7 +6229,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../mainwindow.cpp" line="4972"/>
<location filename="../mainwindow.cpp" line="8084"/>
<location filename="../mainwindow.cpp" line="8076"/>
<source>Do you want to save it?</source>
<translation></translation>
</message>
@ -6214,23 +6253,23 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.cpp" line="5247"/>
<location filename="../mainwindow.cpp" line="5258"/>
<location filename="../mainwindow.cpp" line="5268"/>
<location filename="../mainwindow.cpp" line="8167"/>
<location filename="../mainwindow.cpp" line="8159"/>
<source>Save Error</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="5414"/>
<location filename="../mainwindow.cpp" line="5406"/>
<source>Change Project Compiler Set</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="5415"/>
<location filename="../mainwindow.cpp" line="5407"/>
<source>Change the project&apos;s compiler set will lose all custom compiler set options.</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="3993"/>
<location filename="../mainwindow.cpp" line="5417"/>
<location filename="../mainwindow.cpp" line="5409"/>
<source>Do you really want to do that?</source>
<translation></translation>
</message>
@ -6253,78 +6292,78 @@ Are you really want to continue?</oldsource>
<translation type="vanished">%1</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6313"/>
<location filename="../mainwindow.cpp" line="6305"/>
<source>Modify Watch</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6314"/>
<location filename="../mainwindow.cpp" line="6306"/>
<source>Watch Expression</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6446"/>
<location filename="../mainwindow.cpp" line="6438"/>
<source>Do you really want to clear all breakpoints in this file?</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6647"/>
<location filename="../mainwindow.cpp" line="6639"/>
<source>New project</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6648"/>
<location filename="../mainwindow.cpp" line="6640"/>
<source>Close %1 and start new project?</source>
<translation>&apos;%1&apos;?</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6661"/>
<location filename="../mainwindow.cpp" line="6653"/>
<source>Folder not exist</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6662"/>
<location filename="../mainwindow.cpp" line="6654"/>
<source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6669"/>
<location filename="../mainwindow.cpp" line="6661"/>
<source>Can&apos;t create folder</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6670"/>
<location filename="../mainwindow.cpp" line="6662"/>
<source>Failed to create folder &apos;%1&apos;.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6685"/>
<location filename="../mainwindow.cpp" line="6677"/>
<source>Save new project as</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7180"/>
<location filename="../mainwindow.cpp" line="7172"/>
<source>Folder %1 is not empty.</source>
<translation>%1</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7181"/>
<location filename="../mainwindow.cpp" line="7173"/>
<source>Do you really want to delete it?</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8004"/>
<location filename="../mainwindow.cpp" line="7996"/>
<source>Change working folder</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8005"/>
<location filename="../mainwindow.cpp" line="7997"/>
<source>File &apos;%1&apos; is not in the current working folder.</source>
<oldsource>File &apos;%1&apos; is not in the current working folder</oldsource>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8008"/>
<location filename="../mainwindow.cpp" line="8000"/>
<source>Do you want to change working folder to &apos;%1&apos;?</source>
<translation>&apos;%1&apos;?</translation>
</message>
@ -6333,28 +6372,28 @@ Are you really want to continue?</oldsource>
<translation type="vanished">...</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8715"/>
<location filename="../mainwindow.cpp" line="8707"/>
<source>Can&apos;t Commit</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8716"/>
<location filename="../mainwindow.cpp" line="8708"/>
<source>Git needs user info to commit.</source>
<translation>Git需要用信息进行提交</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8984"/>
<location filename="../mainwindow.cpp" line="8976"/>
<source>Choose Input Data File</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8986"/>
<location filename="../mainwindow.cpp" line="9041"/>
<location filename="../mainwindow.cpp" line="8978"/>
<location filename="../mainwindow.cpp" line="9033"/>
<source>All files (*.*)</source>
<translation> (*.*)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="9039"/>
<location filename="../mainwindow.cpp" line="9031"/>
<source>Choose Expected Output Data File</source>
<oldsource>Choose Expected Input Data File</oldsource>
<translation></translation>
@ -6366,59 +6405,59 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.ui" line="2887"/>
<location filename="../mainwindow.ui" line="2890"/>
<location filename="../mainwindow.cpp" line="8060"/>
<location filename="../mainwindow.cpp" line="8052"/>
<source>Choose Working Folder</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8484"/>
<location filename="../mainwindow.cpp" line="8533"/>
<location filename="../mainwindow.cpp" line="8476"/>
<location filename="../mainwindow.cpp" line="8525"/>
<source>Header Exists</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8485"/>
<location filename="../mainwindow.cpp" line="8534"/>
<location filename="../mainwindow.cpp" line="8477"/>
<location filename="../mainwindow.cpp" line="8526"/>
<source>Header file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8539"/>
<location filename="../mainwindow.cpp" line="8531"/>
<source>Source Exists</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8540"/>
<location filename="../mainwindow.cpp" line="8532"/>
<source>Source file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8694"/>
<location filename="../mainwindow.cpp" line="8686"/>
<source>Can&apos;t commit!</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8695"/>
<location filename="../mainwindow.cpp" line="8687"/>
<source>The following files are in conflicting:</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8700"/>
<location filename="../mainwindow.cpp" line="8692"/>
<source>Commit Message</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8700"/>
<location filename="../mainwindow.cpp" line="8692"/>
<source>Commit Message:</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8703"/>
<location filename="../mainwindow.cpp" line="8695"/>
<source>Commit Failed</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8704"/>
<location filename="../mainwindow.cpp" line="8696"/>
<source>Commit message shouldn&apos;t be empty!</source>
<translation></translation>
</message>
@ -6427,22 +6466,22 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Dev-C++ (*.dev)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6699"/>
<location filename="../mainwindow.cpp" line="6691"/>
<source>New project fail</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6700"/>
<location filename="../mainwindow.cpp" line="6692"/>
<source>Can&apos;t assign project template</source>
<translation>使</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6801"/>
<location filename="../mainwindow.cpp" line="6793"/>
<source>Remove file</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6802"/>
<location filename="../mainwindow.cpp" line="6794"/>
<source>Remove the file from disk?</source>
<translation></translation>
</message>
@ -6451,27 +6490,27 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7103"/>
<location filename="../mainwindow.cpp" line="7095"/>
<source>New Project File Name</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7104"/>
<location filename="../mainwindow.cpp" line="7096"/>
<source>File Name:</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7112"/>
<location filename="../mainwindow.cpp" line="7104"/>
<source>File Already Exists!</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7113"/>
<location filename="../mainwindow.cpp" line="7105"/>
<source>File &apos;%1&apos; already exists!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6755"/>
<location filename="../mainwindow.cpp" line="6747"/>
<source>Add to project</source>
<translation></translation>
</message>
@ -6502,78 +6541,78 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6687"/>
<location filename="../mainwindow.cpp" line="6679"/>
<source>Red Panda C++ project file (*.dev)</source>
<translation>C++(*.dev)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7560"/>
<location filename="../mainwindow.cpp" line="7552"/>
<source>Rename Error</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7561"/>
<location filename="../mainwindow.cpp" line="7553"/>
<source>Symbol &apos;%1&apos; is defined in system header.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7588"/>
<location filename="../mainwindow.cpp" line="7580"/>
<source>New Name</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7758"/>
<location filename="../mainwindow.cpp" line="7781"/>
<location filename="../mainwindow.cpp" line="7792"/>
<location filename="../mainwindow.cpp" line="7813"/>
<location filename="../mainwindow.cpp" line="7750"/>
<location filename="../mainwindow.cpp" line="7773"/>
<location filename="../mainwindow.cpp" line="7784"/>
<location filename="../mainwindow.cpp" line="7805"/>
<source>Replace Error</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7759"/>
<location filename="../mainwindow.cpp" line="7751"/>
<source>Can&apos;t open file &apos;%1&apos; for replace!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7793"/>
<location filename="../mainwindow.cpp" line="7785"/>
<source>Contents has changed since last search!</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7855"/>
<location filename="../mainwindow.cpp" line="7847"/>
<source>Rich Text Format Files (*.rtf)</source>
<translation>RTF格式文件 (*.rtf)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="7877"/>
<location filename="../mainwindow.cpp" line="7869"/>
<source>HTML Files (*.html)</source>
<translation>HTML文件 (*.html)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8082"/>
<location filename="../mainwindow.cpp" line="8074"/>
<source>The current problem set is not empty.</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8101"/>
<location filename="../mainwindow.cpp" line="8093"/>
<source>Problem %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8149"/>
<location filename="../mainwindow.cpp" line="8180"/>
<location filename="../mainwindow.cpp" line="8141"/>
<location filename="../mainwindow.cpp" line="8172"/>
<source>Problem Set Files (*.pbs)</source>
<translation> (*.pbs)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8194"/>
<location filename="../mainwindow.cpp" line="9304"/>
<location filename="../mainwindow.cpp" line="8186"/>
<location filename="../mainwindow.cpp" line="9296"/>
<source>Load Error</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="4075"/>
<location filename="../mainwindow.cpp" line="8208"/>
<location filename="../mainwindow.cpp" line="8200"/>
<source>Problem Case %1</source>
<translation>%1</translation>
</message>
@ -6589,11 +6628,9 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.cpp" line="3318"/>
<location filename="../mainwindow.cpp" line="5081"/>
<location filename="../mainwindow.cpp" line="5199"/>
<location filename="../mainwindow.cpp" line="5380"/>
<location filename="../mainwindow.cpp" line="5392"/>
<location filename="../mainwindow.cpp" line="5870"/>
<location filename="../mainwindow.cpp" line="5882"/>
<location filename="../mainwindow.cpp" line="9124"/>
<location filename="../mainwindow.cpp" line="5862"/>
<location filename="../mainwindow.cpp" line="5874"/>
<location filename="../mainwindow.cpp" line="9116"/>
<source>Error</source>
<translation></translation>
</message>
@ -6645,54 +6682,54 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="5641"/>
<location filename="../mainwindow.cpp" line="5633"/>
<source>Compile Failed</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="5647"/>
<location filename="../mainwindow.cpp" line="5639"/>
<source>Run Failed</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="3349"/>
<location filename="../mainwindow.cpp" line="5899"/>
<location filename="../mainwindow.cpp" line="5913"/>
<location filename="../mainwindow.cpp" line="9107"/>
<location filename="../mainwindow.cpp" line="5891"/>
<location filename="../mainwindow.cpp" line="5905"/>
<location filename="../mainwindow.cpp" line="9099"/>
<source>Confirm Convertion</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="3350"/>
<location filename="../mainwindow.cpp" line="5900"/>
<location filename="../mainwindow.cpp" line="5914"/>
<location filename="../mainwindow.cpp" line="9108"/>
<location filename="../mainwindow.cpp" line="5892"/>
<location filename="../mainwindow.cpp" line="5906"/>
<location filename="../mainwindow.cpp" line="9100"/>
<source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source>
<translation>使%1&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6058"/>
<location filename="../mainwindow.cpp" line="6050"/>
<source>New Watch Expression</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6059"/>
<location filename="../mainwindow.cpp" line="6051"/>
<source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6116"/>
<location filename="../mainwindow.cpp" line="6108"/>
<source>Parsing file %1 of %2: &quot;%3&quot;</source>
<translation>%1/%2&quot;%3&quot;</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6138"/>
<location filename="../mainwindow.cpp" line="6144"/>
<location filename="../mainwindow.cpp" line="6130"/>
<location filename="../mainwindow.cpp" line="6136"/>
<source>Done parsing %1 files in %2 seconds</source>
<translation>%1,%2</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="6141"/>
<location filename="../mainwindow.cpp" line="6133"/>
<source>(%1 files per second)</source>
<translation>(%1</translation>
</message>
@ -8137,7 +8174,7 @@ Are you really want to continue?</oldsource>
<translation>(-g3)</translation>
</message>
<message>
<location filename="../settings.cpp" line="2976"/>
<location filename="../settings.cpp" line="2988"/>
<source>Would you like Red Panda C++ to search for compilers in PATH?</source>
<translation>C++PATH路径中寻找gcc编译器吗</translation>
</message>
@ -8250,7 +8287,7 @@ Are you really want to continue?</oldsource>
<translation type="vanished">(-S)</translation>
</message>
<message>
<location filename="../settings.cpp" line="2978"/>
<location filename="../settings.cpp" line="2990"/>
<source>Confirm</source>
<translation></translation>
</message>
@ -8271,13 +8308,13 @@ Are you really want to continue?</oldsource>
<translation type="vanished">&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="../settings.cpp" line="2968"/>
<location filename="../settings.cpp" line="2974"/>
<location filename="../settings.cpp" line="2980"/>
<location filename="../settings.cpp" line="2986"/>
<source>Compiler set not configuared.</source>
<translation></translation>
</message>
<message>
<location filename="../settings.cpp" line="2970"/>
<location filename="../settings.cpp" line="2982"/>
<source>Would you like Red Panda C++ to search for compilers in the following locations: &lt;BR /&gt;&apos;%1&apos;&lt;BR /&gt;&apos;%2&apos;? </source>
<translation>C++&lt;br /&gt;%1&lt;br /&gt;%2</translation>
</message>
@ -9357,7 +9394,7 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.cpp" line="2118"/>
<location filename="../mainwindow.cpp" line="2213"/>
<location filename="../mainwindow.cpp" line="9132"/>
<location filename="../mainwindow.cpp" line="9124"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="167"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="250"/>
<source>Compiler Set</source>
@ -9366,7 +9403,7 @@ Are you really want to continue?</oldsource>
<message>
<location filename="../mainwindow.cpp" line="2119"/>
<location filename="../mainwindow.cpp" line="2214"/>
<location filename="../mainwindow.cpp" line="9133"/>
<location filename="../mainwindow.cpp" line="9125"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="167"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="170"/>
<source>Compiler</source>
@ -9378,7 +9415,7 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8071"/>
<location filename="../mainwindow.cpp" line="8063"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="173"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="209"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="215"/>
@ -9455,15 +9492,15 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8072"/>
<location filename="../mainwindow.cpp" line="8431"/>
<location filename="../mainwindow.cpp" line="8064"/>
<location filename="../mainwindow.cpp" line="8423"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="209"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="212"/>
<source>Program Runner</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8430"/>
<location filename="../mainwindow.cpp" line="8422"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="212"/>
<source>Problem Set</source>
<translation></translation>

View File

@ -931,6 +931,30 @@
<source>Can&apos;t generate temporary backup file &apos;%1&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore backup</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Backup file &apos;%1&apos; detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Continue to save?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error occurred at last save.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you want to load the backup file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error Load File</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditorAutoSaveWidget</name>
@ -990,6 +1014,10 @@
<source>Demo file name: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Auto backup editing contents</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditorClipboardWidget</name>

View File

@ -41,7 +41,6 @@ Document::Document(const QFont& font, const QFont& nonAsciiFont, QObject *parent
mMutex(QMutex::Recursive)
#endif
{
mAppendNewLineAtEOF = true;
mNewlineType = NewlineType::Windows;
mIndexOfLongestLine = -1;

View File

@ -3972,6 +3972,11 @@ void QSynEdit::onScrolled(int)
invalidate();
}
const QDateTime &QSynEdit::lastModifyTime() const
{
return mLastModifyTime;
}
double QSynEdit::lineSpacingFactor() const
{
return mLineSpacingFactor;

View File

@ -784,6 +784,8 @@ protected:
double lineSpacingFactor() const;
void setLineSpacingFactor(double newLineSpacingFactor);
const QDateTime &lastModifyTime() const;
protected:
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;