From cce3d45d5960b56114135036fc3ba65d69d60771 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 25 Dec 2021 23:46:12 +0800 Subject: [PATCH] disable copy as html in linux --- RedPandaIDE/settings.cpp | 6 +++++- RedPandaIDE/settingsdialog/editorclipboardwidget.cpp | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 93adbdd7..29031f40 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1198,7 +1198,11 @@ void Settings::Editor::doLoad() mCopySizeLimit = boolValue("copy_limit",true); mCopyCharLimits = intValue("copy_char_limits",100); mCopyLineLimits = intValue("copy_line_limits",100000); - mCopyWithFormatAs = intValue("copy_with_format_as",1); +#ifdef Q_OS_WIN + mCopyWithFormatAs = intValue("copy_with_format_as",1); //html +#else + mCopyWithFormatAs = intValue("copy_with_format_as",0); //none +#endif mCopyRTFUseBackground = boolValue("copy_rtf_use_background",false); mCopyRTFUseEditorColor = boolValue("copy_rtf_use_editor_color_scheme",false); mCopyRTFColorScheme = stringValue("copy_rtf_color_scheme","Intellij Classic"); diff --git a/RedPandaIDE/settingsdialog/editorclipboardwidget.cpp b/RedPandaIDE/settingsdialog/editorclipboardwidget.cpp index d5ab03d2..5ac828a0 100644 --- a/RedPandaIDE/settingsdialog/editorclipboardwidget.cpp +++ b/RedPandaIDE/settingsdialog/editorclipboardwidget.cpp @@ -10,7 +10,9 @@ EditorClipboardWidget::EditorClipboardWidget(const QString& name, const QString& { ui->setupUi(this); ui->cbCopyWithFormatAs->addItem("None"); +#ifdef Q_OS_WIN ui->cbCopyWithFormatAs->addItem("HTML"); +#endif for (QString name: pColorManager->getSchemes()) { ui->cbHTMLColorScheme->addItem(name);