forked from qt-creator/qt-creator
Make terminal settings more flexible
Currently "Open Terminal Here" and such expect the terminal command without any arguments to be behaving correctly for this. That is not the case for Konsole at least, since it just opens another window in a running instance, with the same working directory, when not convinced to do otherwise with additional command line parameters Separate options for "Open Terminal Here" and "Run in terminal" in the options. Task-number: QTCREATORBUG-20900 Change-Id: I598d1f7f0bf22b5c21dc1c60333397bdf9fab1b4 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -27,6 +27,13 @@
|
||||
|
||||
namespace Utils {
|
||||
|
||||
TerminalCommand::TerminalCommand(const QString &command, const QString &openArgs, const QString &executeArgs)
|
||||
: command(command)
|
||||
, openArgs(openArgs)
|
||||
, executeArgs(executeArgs)
|
||||
{
|
||||
}
|
||||
|
||||
ConsoleProcess::~ConsoleProcess()
|
||||
{
|
||||
stop();
|
||||
@@ -151,4 +158,16 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS
|
||||
emit processError(errorString);
|
||||
}
|
||||
|
||||
bool TerminalCommand::operator==(const TerminalCommand &other) const
|
||||
{
|
||||
return other.command == command && other.executeArgs == executeArgs;
|
||||
}
|
||||
|
||||
bool TerminalCommand::operator<(const TerminalCommand &other) const
|
||||
{
|
||||
if (command == other.command)
|
||||
return executeArgs < other.executeArgs;
|
||||
return command < other.command;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QVector>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
@@ -37,6 +38,20 @@ namespace Utils {
|
||||
class Environment;
|
||||
struct ConsoleProcessPrivate;
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT TerminalCommand
|
||||
{
|
||||
public:
|
||||
TerminalCommand() = default;
|
||||
TerminalCommand(const QString &command, const QString &openArgs, const QString &executeArgs);
|
||||
|
||||
bool operator==(const TerminalCommand &other) const;
|
||||
bool operator<(const TerminalCommand &other) const;
|
||||
|
||||
QString command;
|
||||
QString openArgs;
|
||||
QString executeArgs;
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -88,17 +103,17 @@ public:
|
||||
#ifndef Q_OS_WIN
|
||||
void setSettings(QSettings *settings);
|
||||
|
||||
static QString defaultTerminalEmulator();
|
||||
static QStringList availableTerminalEmulators();
|
||||
static QString terminalEmulator(const QSettings *settings, bool nonEmpty = true);
|
||||
static void setTerminalEmulator(QSettings *settings, const QString &term);
|
||||
static TerminalCommand defaultTerminalEmulator();
|
||||
static QVector<TerminalCommand> availableTerminalEmulators();
|
||||
static TerminalCommand terminalEmulator(const QSettings *settings);
|
||||
static void setTerminalEmulator(QSettings *settings, const TerminalCommand &term);
|
||||
#else
|
||||
void setSettings(QSettings *) {}
|
||||
|
||||
static QString defaultTerminalEmulator() { return QString(); }
|
||||
static QStringList availableTerminalEmulators() { return QStringList(); }
|
||||
static QString terminalEmulator(const QSettings *, bool = true) { return QString(); }
|
||||
static void setTerminalEmulator(QSettings *, const QString &) {}
|
||||
static TerminalCommand defaultTerminalEmulator() { return TerminalCommand(); }
|
||||
static QVector<TerminalCommand> availableTerminalEmulators() { return {}; }
|
||||
static TerminalCommand terminalEmulator(const QSettings *) { return TerminalCommand(); }
|
||||
static void setTerminalEmulator(QSettings *, const TerminalCommand &) {}
|
||||
#endif
|
||||
|
||||
static bool startTerminalEmulator(QSettings *settings, const QString &workingDir);
|
||||
@@ -144,3 +159,5 @@ private:
|
||||
};
|
||||
|
||||
} //namespace Utils
|
||||
|
||||
Q_DECLARE_METATYPE(Utils::TerminalCommand)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "qtcprocess.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -95,9 +96,12 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
||||
}
|
||||
|
||||
QtcProcess::SplitError qerr;
|
||||
QtcProcess::Arguments xtermArgs = QtcProcess::prepareArgs(terminalEmulator(d->m_settings), &qerr,
|
||||
HostOsInfo::hostOs(),
|
||||
&d->m_environment, &d->m_workingDir);
|
||||
const TerminalCommand terminal = terminalEmulator(d->m_settings);
|
||||
const QtcProcess::Arguments terminalArgs = QtcProcess::prepareArgs(terminal.executeArgs,
|
||||
&qerr,
|
||||
HostOsInfo::hostOs(),
|
||||
&d->m_environment,
|
||||
&d->m_workingDir);
|
||||
if (qerr != QtcProcess::SplitOk) {
|
||||
emitError(QProcess::FailedToStart, qerr == QtcProcess::BadQuoting
|
||||
? tr("Quoting error in terminal command.")
|
||||
@@ -138,22 +142,22 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
||||
|
||||
const QString stubPath = QCoreApplication::applicationDirPath()
|
||||
+ QLatin1String("/" QTC_REL_TOOLS_PATH "/qtcreator_process_stub");
|
||||
QStringList allArgs = xtermArgs.toUnixArgs();
|
||||
allArgs << stubPath
|
||||
<< modeOption(d->m_mode)
|
||||
<< d->m_stubServer.fullServerName()
|
||||
<< msgPromptToClose()
|
||||
<< workingDirectory()
|
||||
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
||||
<< QString::number(getpid())
|
||||
<< pcmd << pargs.toUnixArgs();
|
||||
const QStringList allArgs = terminalArgs.toUnixArgs()
|
||||
<< stubPath
|
||||
<< modeOption(d->m_mode)
|
||||
<< d->m_stubServer.fullServerName()
|
||||
<< msgPromptToClose()
|
||||
<< workingDirectory()
|
||||
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
||||
<< QString::number(getpid())
|
||||
<< pcmd
|
||||
<< pargs.toUnixArgs();
|
||||
|
||||
QString xterm = allArgs.takeFirst();
|
||||
d->m_process.start(xterm, allArgs);
|
||||
d->m_process.start(terminal.command, allArgs);
|
||||
if (!d->m_process.waitForStarted()) {
|
||||
stubServerShutdown();
|
||||
emitError(QProcess::UnknownError, tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
||||
"Environment options.").arg(xterm));
|
||||
"Environment options.").arg(terminal.command));
|
||||
delete d->m_tempFile;
|
||||
d->m_tempFile = 0;
|
||||
return false;
|
||||
@@ -327,83 +331,110 @@ void ConsoleProcess::stubExited()
|
||||
emit stubStopped();
|
||||
}
|
||||
|
||||
struct Terminal {
|
||||
const char *binary;
|
||||
const char *options;
|
||||
};
|
||||
|
||||
static const Terminal knownTerminals[] =
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QVector<TerminalCommand>, knownTerminals, (
|
||||
{
|
||||
{"x-terminal-emulator", "-e"},
|
||||
{"xterm", "-e"},
|
||||
{"aterm", "-e"},
|
||||
{"Eterm", "-e"},
|
||||
{"rxvt", "-e"},
|
||||
{"urxvt", "-e"},
|
||||
{"xfce4-terminal", "-x"},
|
||||
{"konsole", "-e"},
|
||||
{"gnome-terminal", "--"}
|
||||
};
|
||||
{"x-terminal-emulator", "", "-e"},
|
||||
{"xterm", "", "-e"},
|
||||
{"aterm", "", "-e"},
|
||||
{"Eterm", "", "-e"},
|
||||
{"rxvt", "", "-e"},
|
||||
{"urxvt", "", "-e"},
|
||||
{"xfce4-terminal", "", "-x"},
|
||||
{"konsole", "--separate", "-e"},
|
||||
{"gnome-terminal", "", "--"}
|
||||
}));
|
||||
|
||||
QString ConsoleProcess::defaultTerminalEmulator()
|
||||
TerminalCommand ConsoleProcess::defaultTerminalEmulator()
|
||||
{
|
||||
if (HostOsInfo::isMacHost()) {
|
||||
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
||||
if (QFileInfo::exists(termCmd))
|
||||
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
||||
return QLatin1String("/usr/X11/bin/xterm");
|
||||
static TerminalCommand defaultTerm;
|
||||
if (defaultTerm.command.isEmpty()) {
|
||||
defaultTerm = []() -> TerminalCommand {
|
||||
if (HostOsInfo::isMacHost()) {
|
||||
QString termCmd = QCoreApplication::applicationDirPath() + "/../Resources/scripts/openTerminal.command";
|
||||
if (QFileInfo::exists(termCmd))
|
||||
return {termCmd.replace(' ', "\\ "), "", ""};
|
||||
return {"/usr/X11/bin/xterm", "", "-e"};
|
||||
}
|
||||
const Environment env = Environment::systemEnvironment();
|
||||
for (const TerminalCommand &term : *knownTerminals) {
|
||||
const QString result = env.searchInPath(term.command).toString();
|
||||
if (!result.isEmpty())
|
||||
return {result, term.openArgs, term.executeArgs};
|
||||
}
|
||||
return {"xterm", "", "-e"};
|
||||
}();
|
||||
}
|
||||
const Environment env = Environment::systemEnvironment();
|
||||
const int terminalCount = int(sizeof(knownTerminals) / sizeof(knownTerminals[0]));
|
||||
for (int i = 0; i < terminalCount; ++i) {
|
||||
QString result = env.searchInPath(QLatin1String(knownTerminals[i].binary)).toString();
|
||||
if (!result.isEmpty()) {
|
||||
result += QLatin1Char(' ');
|
||||
result += QLatin1String(knownTerminals[i].options);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return QLatin1String("xterm -e");
|
||||
return defaultTerm;
|
||||
}
|
||||
|
||||
QStringList ConsoleProcess::availableTerminalEmulators()
|
||||
QVector<TerminalCommand> ConsoleProcess::availableTerminalEmulators()
|
||||
{
|
||||
QStringList result;
|
||||
QVector<TerminalCommand> result;
|
||||
const Environment env = Environment::systemEnvironment();
|
||||
const int terminalCount = int(sizeof(knownTerminals) / sizeof(knownTerminals[0]));
|
||||
for (int i = 0; i < terminalCount; ++i) {
|
||||
QString terminal = env.searchInPath(QLatin1String(knownTerminals[i].binary)).toString();
|
||||
if (!terminal.isEmpty()) {
|
||||
terminal += QLatin1Char(' ');
|
||||
terminal += QLatin1String(knownTerminals[i].options);
|
||||
result.push_back(terminal);
|
||||
}
|
||||
for (const TerminalCommand &term : *knownTerminals) {
|
||||
const QString command = env.searchInPath(term.command).toString();
|
||||
if (!command.isEmpty())
|
||||
result.push_back({command, term.openArgs, term.executeArgs});
|
||||
}
|
||||
if (!result.contains(defaultTerminalEmulator()))
|
||||
result.append(defaultTerminalEmulator());
|
||||
result.sort();
|
||||
// sort and put default terminal on top
|
||||
const TerminalCommand defaultTerm = defaultTerminalEmulator();
|
||||
result.removeAll(defaultTerm);
|
||||
sort(result);
|
||||
result.prepend(defaultTerm);
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ConsoleProcess::terminalEmulator(const QSettings *settings, bool nonEmpty)
|
||||
const char kTerminalVersion[] = "4.8";
|
||||
const char kTerminalVersionKey[] = "General/Terminal/SettingsVersion";
|
||||
const char kTerminalCommandKey[] = "General/Terminal/Command";
|
||||
const char kTerminalOpenOptionsKey[] = "General/Terminal/OpenOptions";
|
||||
const char kTerminalExecuteOptionsKey[] = "General/Terminal/ExecuteOptions";
|
||||
|
||||
TerminalCommand ConsoleProcess::terminalEmulator(const QSettings *settings)
|
||||
{
|
||||
if (settings) {
|
||||
const QString value = settings->value(QLatin1String("General/TerminalEmulator")).toString();
|
||||
if (!nonEmpty || !value.isEmpty())
|
||||
return value;
|
||||
if (settings->value(kTerminalVersionKey).toString() == kTerminalVersion) {
|
||||
if (settings->contains(kTerminalCommandKey))
|
||||
return {settings->value(kTerminalCommandKey).toString(),
|
||||
settings->value(kTerminalOpenOptionsKey).toString(),
|
||||
settings->value(kTerminalExecuteOptionsKey).toString()};
|
||||
} else {
|
||||
// TODO remove reading of old settings some time after 4.8
|
||||
const QString value = settings->value("General/TerminalEmulator").toString().trimmed();
|
||||
if (!value.isEmpty()) {
|
||||
// split off command and options
|
||||
const QStringList splitCommand = QtcProcess::splitArgs(value);
|
||||
if (QTC_GUARD(!splitCommand.isEmpty())) {
|
||||
const QString command = splitCommand.first();
|
||||
const QStringList quotedArgs = Utils::transform(splitCommand.mid(1),
|
||||
&QtcProcess::quoteArgUnix);
|
||||
const QString options = quotedArgs.join(' ');
|
||||
return {command, "", options};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return defaultTerminalEmulator();
|
||||
}
|
||||
|
||||
void ConsoleProcess::setTerminalEmulator(QSettings *settings, const QString &term)
|
||||
void ConsoleProcess::setTerminalEmulator(QSettings *settings, const TerminalCommand &term)
|
||||
{
|
||||
settings->setValue(QLatin1String("General/TerminalEmulator"), term);
|
||||
settings->setValue(kTerminalVersionKey, kTerminalVersion);
|
||||
if (term == defaultTerminalEmulator()) {
|
||||
settings->remove(kTerminalCommandKey);
|
||||
settings->remove(kTerminalOpenOptionsKey);
|
||||
settings->remove(kTerminalExecuteOptionsKey);
|
||||
} else {
|
||||
settings->setValue(kTerminalCommandKey, term.command);
|
||||
settings->setValue(kTerminalOpenOptionsKey, term.openArgs);
|
||||
settings->setValue(kTerminalExecuteOptionsKey, term.executeArgs);
|
||||
}
|
||||
}
|
||||
|
||||
bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)
|
||||
{
|
||||
const QString emu = QtcProcess::splitArgs(terminalEmulator(settings)).takeFirst();
|
||||
return QProcess::startDetached(emu, QStringList(), workingDir);
|
||||
const TerminalCommand term = terminalEmulator(settings);
|
||||
return QProcess::startDetached(term.command, QtcProcess::splitArgs(term.openArgs), workingDir);
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
@@ -69,14 +69,22 @@ QWidget *SystemSettings::widget()
|
||||
|
||||
m_page->reloadBehavior->setCurrentIndex(EditorManager::reloadSetting());
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
const QStringList availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||
const QString currentTerminal = ConsoleProcess::terminalEmulator(ICore::settings(), false);
|
||||
m_page->terminalComboBox->addItems(availableTerminals);
|
||||
m_page->terminalComboBox->lineEdit()->setText(currentTerminal);
|
||||
m_page->terminalComboBox->lineEdit()->setPlaceholderText(ConsoleProcess::defaultTerminalEmulator());
|
||||
const QVector<TerminalCommand> availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||
for (const TerminalCommand &term : availableTerminals)
|
||||
m_page->terminalComboBox->addItem(term.command, qVariantFromValue(term));
|
||||
updateTerminalUi(ConsoleProcess::terminalEmulator(ICore::settings()));
|
||||
connect(m_page->terminalComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
[this](int index) {
|
||||
updateTerminalUi(
|
||||
m_page->terminalComboBox->itemData(index).value<TerminalCommand>());
|
||||
});
|
||||
} else {
|
||||
m_page->terminalLabel->hide();
|
||||
m_page->terminalComboBox->hide();
|
||||
m_page->terminalOpenArgs->hide();
|
||||
m_page->terminalExecuteArgs->hide();
|
||||
m_page->resetTerminalButton->hide();
|
||||
}
|
||||
|
||||
@@ -156,7 +164,9 @@ void SystemSettings::apply()
|
||||
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_page->reloadBehavior->currentIndex()));
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
ConsoleProcess::setTerminalEmulator(ICore::settings(),
|
||||
m_page->terminalComboBox->lineEdit()->text());
|
||||
{m_page->terminalComboBox->lineEdit()->text(),
|
||||
m_page->terminalOpenArgs->text(),
|
||||
m_page->terminalExecuteArgs->text()});
|
||||
if (!HostOsInfo::isMacHost()) {
|
||||
UnixUtils::setFileBrowser(ICore::settings(),
|
||||
m_page->externalFileBrowserEdit->text());
|
||||
@@ -193,7 +203,14 @@ void SystemSettings::finish()
|
||||
void SystemSettings::resetTerminal()
|
||||
{
|
||||
if (HostOsInfo::isAnyUnixHost())
|
||||
m_page->terminalComboBox->lineEdit()->clear();
|
||||
m_page->terminalComboBox->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void SystemSettings::updateTerminalUi(const TerminalCommand &term)
|
||||
{
|
||||
m_page->terminalComboBox->lineEdit()->setText(term.command);
|
||||
m_page->terminalOpenArgs->setText(term.openArgs);
|
||||
m_page->terminalExecuteArgs->setText(term.executeArgs);
|
||||
}
|
||||
|
||||
void SystemSettings::resetFileBrowser()
|
||||
|
||||
@@ -32,6 +32,8 @@ QT_BEGIN_NAMESPACE
|
||||
class QMessageBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils { class TerminalCommand; }
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
@@ -52,6 +54,7 @@ private:
|
||||
void showHelpForFileBrowser();
|
||||
void resetFileBrowser();
|
||||
void resetTerminal();
|
||||
void updateTerminalUi(const Utils::TerminalCommand &term);
|
||||
void updatePath();
|
||||
|
||||
void variableHelpDialogCreator(const QString &helpText);
|
||||
|
||||
@@ -17,68 +17,67 @@
|
||||
<string>System</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="3">
|
||||
<item row="5" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="modifiedLabel">
|
||||
<property name="text">
|
||||
<string>When files are externally modified:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="reloadBehavior">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always Ask</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Reload All Unchanged Editors</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Ignore Modifications</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="externalFileBrowserLabel">
|
||||
<property name="text">
|
||||
<string>External file browser:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QToolButton" name="helpExternalFileBrowserButton">
|
||||
<property name="text">
|
||||
<string>?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="resetFileBrowserButton">
|
||||
<property name="toolTip">
|
||||
<string comment="File Browser">Reset to default.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="4">
|
||||
<widget class="QWidget" name="fileSystemCaseSensitivityWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="toolTip">
|
||||
<string>Influences how file names are matched to decide if they are the same.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>File system case sensitivity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="fileSystemCaseSensitivityChooser"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
<item row="6" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoSaveCheckBox">
|
||||
@@ -138,140 +137,17 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="Utils::PathChooser" name="patchChooser" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="externalFileBrowserLabel">
|
||||
<property name="text">
|
||||
<string>External file browser:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="terminalLabel">
|
||||
<property name="text">
|
||||
<string>Terminal:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="externalFileBrowserEdit"/>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="modifiedLabel">
|
||||
<property name="text">
|
||||
<string>When files are externally modified:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="reloadBehavior">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always Ask</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Reload All Unchanged Editors</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Ignore Modifications</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="resetTerminalButton">
|
||||
<property name="toolTip">
|
||||
<string comment="Terminal">Reset to default.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="terminalComboBox">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="warnBeforeOpeningBigFiles">
|
||||
<property name="text">
|
||||
<string>Warn before opening text files greater than</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="bigFilesLimitSpinBox">
|
||||
<property name="suffix">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="patchCommandLabel">
|
||||
<property name="text">
|
||||
<string>Patch command:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="externalFileBrowserEdit"/>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoSuspendCheckBox">
|
||||
@@ -337,6 +213,154 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="resetFileBrowserButton">
|
||||
<property name="toolTip">
|
||||
<string comment="File Browser">Reset to default.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="warnBeforeOpeningBigFiles">
|
||||
<property name="text">
|
||||
<string>Warn before opening text files greater than</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="bigFilesLimitSpinBox">
|
||||
<property name="suffix">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="Utils::PathChooser" name="patchChooser" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="resetTerminalButton">
|
||||
<property name="toolTip">
|
||||
<string comment="Terminal">Reset to default.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4">
|
||||
<widget class="QWidget" name="fileSystemCaseSensitivityWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="toolTip">
|
||||
<string>Influences how file names are matched to decide if they are the same.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>File system case sensitivity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="fileSystemCaseSensitivityChooser"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="terminalLabel">
|
||||
<property name="text">
|
||||
<string>Terminal:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QComboBox" name="terminalComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="terminalOpenArgs">
|
||||
<property name="toolTip">
|
||||
<string>Command line arguments used for "Open Terminal Here".</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="terminalExecuteArgs">
|
||||
<property name="toolTip">
|
||||
<string>Command line arguments used for "Run in terminal".</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -368,7 +392,6 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>terminalComboBox</tabstop>
|
||||
<tabstop>resetTerminalButton</tabstop>
|
||||
<tabstop>externalFileBrowserEdit</tabstop>
|
||||
<tabstop>resetFileBrowserButton</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user