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 {
|
namespace Utils {
|
||||||
|
|
||||||
|
TerminalCommand::TerminalCommand(const QString &command, const QString &openArgs, const QString &executeArgs)
|
||||||
|
: command(command)
|
||||||
|
, openArgs(openArgs)
|
||||||
|
, executeArgs(executeArgs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
ConsoleProcess::~ConsoleProcess()
|
ConsoleProcess::~ConsoleProcess()
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
@@ -151,4 +158,16 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS
|
|||||||
emit processError(errorString);
|
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 "utils_global.h"
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QSettings;
|
class QSettings;
|
||||||
@@ -37,6 +38,20 @@ namespace Utils {
|
|||||||
class Environment;
|
class Environment;
|
||||||
struct ConsoleProcessPrivate;
|
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
|
class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -88,17 +103,17 @@ public:
|
|||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
void setSettings(QSettings *settings);
|
void setSettings(QSettings *settings);
|
||||||
|
|
||||||
static QString defaultTerminalEmulator();
|
static TerminalCommand defaultTerminalEmulator();
|
||||||
static QStringList availableTerminalEmulators();
|
static QVector<TerminalCommand> availableTerminalEmulators();
|
||||||
static QString terminalEmulator(const QSettings *settings, bool nonEmpty = true);
|
static TerminalCommand terminalEmulator(const QSettings *settings);
|
||||||
static void setTerminalEmulator(QSettings *settings, const QString &term);
|
static void setTerminalEmulator(QSettings *settings, const TerminalCommand &term);
|
||||||
#else
|
#else
|
||||||
void setSettings(QSettings *) {}
|
void setSettings(QSettings *) {}
|
||||||
|
|
||||||
static QString defaultTerminalEmulator() { return QString(); }
|
static TerminalCommand defaultTerminalEmulator() { return TerminalCommand(); }
|
||||||
static QStringList availableTerminalEmulators() { return QStringList(); }
|
static QVector<TerminalCommand> availableTerminalEmulators() { return {}; }
|
||||||
static QString terminalEmulator(const QSettings *, bool = true) { return QString(); }
|
static TerminalCommand terminalEmulator(const QSettings *) { return TerminalCommand(); }
|
||||||
static void setTerminalEmulator(QSettings *, const QString &) {}
|
static void setTerminalEmulator(QSettings *, const TerminalCommand &) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool startTerminalEmulator(QSettings *settings, const QString &workingDir);
|
static bool startTerminalEmulator(QSettings *settings, const QString &workingDir);
|
||||||
@@ -144,3 +159,5 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} //namespace Utils
|
} //namespace Utils
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(Utils::TerminalCommand)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "qtcprocess.h"
|
#include "qtcprocess.h"
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -95,9 +96,12 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtcProcess::SplitError qerr;
|
QtcProcess::SplitError qerr;
|
||||||
QtcProcess::Arguments xtermArgs = QtcProcess::prepareArgs(terminalEmulator(d->m_settings), &qerr,
|
const TerminalCommand terminal = terminalEmulator(d->m_settings);
|
||||||
HostOsInfo::hostOs(),
|
const QtcProcess::Arguments terminalArgs = QtcProcess::prepareArgs(terminal.executeArgs,
|
||||||
&d->m_environment, &d->m_workingDir);
|
&qerr,
|
||||||
|
HostOsInfo::hostOs(),
|
||||||
|
&d->m_environment,
|
||||||
|
&d->m_workingDir);
|
||||||
if (qerr != QtcProcess::SplitOk) {
|
if (qerr != QtcProcess::SplitOk) {
|
||||||
emitError(QProcess::FailedToStart, qerr == QtcProcess::BadQuoting
|
emitError(QProcess::FailedToStart, qerr == QtcProcess::BadQuoting
|
||||||
? tr("Quoting error in terminal command.")
|
? tr("Quoting error in terminal command.")
|
||||||
@@ -138,22 +142,22 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
|||||||
|
|
||||||
const QString stubPath = QCoreApplication::applicationDirPath()
|
const QString stubPath = QCoreApplication::applicationDirPath()
|
||||||
+ QLatin1String("/" QTC_REL_TOOLS_PATH "/qtcreator_process_stub");
|
+ QLatin1String("/" QTC_REL_TOOLS_PATH "/qtcreator_process_stub");
|
||||||
QStringList allArgs = xtermArgs.toUnixArgs();
|
const QStringList allArgs = terminalArgs.toUnixArgs()
|
||||||
allArgs << stubPath
|
<< stubPath
|
||||||
<< modeOption(d->m_mode)
|
<< modeOption(d->m_mode)
|
||||||
<< d->m_stubServer.fullServerName()
|
<< d->m_stubServer.fullServerName()
|
||||||
<< msgPromptToClose()
|
<< msgPromptToClose()
|
||||||
<< workingDirectory()
|
<< workingDirectory()
|
||||||
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
||||||
<< QString::number(getpid())
|
<< QString::number(getpid())
|
||||||
<< pcmd << pargs.toUnixArgs();
|
<< pcmd
|
||||||
|
<< pargs.toUnixArgs();
|
||||||
|
|
||||||
QString xterm = allArgs.takeFirst();
|
d->m_process.start(terminal.command, allArgs);
|
||||||
d->m_process.start(xterm, allArgs);
|
|
||||||
if (!d->m_process.waitForStarted()) {
|
if (!d->m_process.waitForStarted()) {
|
||||||
stubServerShutdown();
|
stubServerShutdown();
|
||||||
emitError(QProcess::UnknownError, tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
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;
|
delete d->m_tempFile;
|
||||||
d->m_tempFile = 0;
|
d->m_tempFile = 0;
|
||||||
return false;
|
return false;
|
||||||
@@ -327,83 +331,110 @@ void ConsoleProcess::stubExited()
|
|||||||
emit stubStopped();
|
emit stubStopped();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Terminal {
|
Q_GLOBAL_STATIC_WITH_ARGS(const QVector<TerminalCommand>, knownTerminals, (
|
||||||
const char *binary;
|
|
||||||
const char *options;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const Terminal knownTerminals[] =
|
|
||||||
{
|
{
|
||||||
{"x-terminal-emulator", "-e"},
|
{"x-terminal-emulator", "", "-e"},
|
||||||
{"xterm", "-e"},
|
{"xterm", "", "-e"},
|
||||||
{"aterm", "-e"},
|
{"aterm", "", "-e"},
|
||||||
{"Eterm", "-e"},
|
{"Eterm", "", "-e"},
|
||||||
{"rxvt", "-e"},
|
{"rxvt", "", "-e"},
|
||||||
{"urxvt", "-e"},
|
{"urxvt", "", "-e"},
|
||||||
{"xfce4-terminal", "-x"},
|
{"xfce4-terminal", "", "-x"},
|
||||||
{"konsole", "-e"},
|
{"konsole", "--separate", "-e"},
|
||||||
{"gnome-terminal", "--"}
|
{"gnome-terminal", "", "--"}
|
||||||
};
|
}));
|
||||||
|
|
||||||
QString ConsoleProcess::defaultTerminalEmulator()
|
TerminalCommand ConsoleProcess::defaultTerminalEmulator()
|
||||||
{
|
{
|
||||||
if (HostOsInfo::isMacHost()) {
|
static TerminalCommand defaultTerm;
|
||||||
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
if (defaultTerm.command.isEmpty()) {
|
||||||
if (QFileInfo::exists(termCmd))
|
defaultTerm = []() -> TerminalCommand {
|
||||||
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
if (HostOsInfo::isMacHost()) {
|
||||||
return QLatin1String("/usr/X11/bin/xterm");
|
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();
|
return defaultTerm;
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList ConsoleProcess::availableTerminalEmulators()
|
QVector<TerminalCommand> ConsoleProcess::availableTerminalEmulators()
|
||||||
{
|
{
|
||||||
QStringList result;
|
QVector<TerminalCommand> result;
|
||||||
const Environment env = Environment::systemEnvironment();
|
const Environment env = Environment::systemEnvironment();
|
||||||
const int terminalCount = int(sizeof(knownTerminals) / sizeof(knownTerminals[0]));
|
for (const TerminalCommand &term : *knownTerminals) {
|
||||||
for (int i = 0; i < terminalCount; ++i) {
|
const QString command = env.searchInPath(term.command).toString();
|
||||||
QString terminal = env.searchInPath(QLatin1String(knownTerminals[i].binary)).toString();
|
if (!command.isEmpty())
|
||||||
if (!terminal.isEmpty()) {
|
result.push_back({command, term.openArgs, term.executeArgs});
|
||||||
terminal += QLatin1Char(' ');
|
|
||||||
terminal += QLatin1String(knownTerminals[i].options);
|
|
||||||
result.push_back(terminal);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!result.contains(defaultTerminalEmulator()))
|
// sort and put default terminal on top
|
||||||
result.append(defaultTerminalEmulator());
|
const TerminalCommand defaultTerm = defaultTerminalEmulator();
|
||||||
result.sort();
|
result.removeAll(defaultTerm);
|
||||||
|
sort(result);
|
||||||
|
result.prepend(defaultTerm);
|
||||||
return result;
|
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) {
|
if (settings) {
|
||||||
const QString value = settings->value(QLatin1String("General/TerminalEmulator")).toString();
|
if (settings->value(kTerminalVersionKey).toString() == kTerminalVersion) {
|
||||||
if (!nonEmpty || !value.isEmpty())
|
if (settings->contains(kTerminalCommandKey))
|
||||||
return value;
|
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();
|
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)
|
bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)
|
||||||
{
|
{
|
||||||
const QString emu = QtcProcess::splitArgs(terminalEmulator(settings)).takeFirst();
|
const TerminalCommand term = terminalEmulator(settings);
|
||||||
return QProcess::startDetached(emu, QStringList(), workingDir);
|
return QProcess::startDetached(term.command, QtcProcess::splitArgs(term.openArgs), workingDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|||||||
@@ -69,14 +69,22 @@ QWidget *SystemSettings::widget()
|
|||||||
|
|
||||||
m_page->reloadBehavior->setCurrentIndex(EditorManager::reloadSetting());
|
m_page->reloadBehavior->setCurrentIndex(EditorManager::reloadSetting());
|
||||||
if (HostOsInfo::isAnyUnixHost()) {
|
if (HostOsInfo::isAnyUnixHost()) {
|
||||||
const QStringList availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
const QVector<TerminalCommand> availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||||
const QString currentTerminal = ConsoleProcess::terminalEmulator(ICore::settings(), false);
|
for (const TerminalCommand &term : availableTerminals)
|
||||||
m_page->terminalComboBox->addItems(availableTerminals);
|
m_page->terminalComboBox->addItem(term.command, qVariantFromValue(term));
|
||||||
m_page->terminalComboBox->lineEdit()->setText(currentTerminal);
|
updateTerminalUi(ConsoleProcess::terminalEmulator(ICore::settings()));
|
||||||
m_page->terminalComboBox->lineEdit()->setPlaceholderText(ConsoleProcess::defaultTerminalEmulator());
|
connect(m_page->terminalComboBox,
|
||||||
|
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
|
this,
|
||||||
|
[this](int index) {
|
||||||
|
updateTerminalUi(
|
||||||
|
m_page->terminalComboBox->itemData(index).value<TerminalCommand>());
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
m_page->terminalLabel->hide();
|
m_page->terminalLabel->hide();
|
||||||
m_page->terminalComboBox->hide();
|
m_page->terminalComboBox->hide();
|
||||||
|
m_page->terminalOpenArgs->hide();
|
||||||
|
m_page->terminalExecuteArgs->hide();
|
||||||
m_page->resetTerminalButton->hide();
|
m_page->resetTerminalButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +164,9 @@ void SystemSettings::apply()
|
|||||||
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_page->reloadBehavior->currentIndex()));
|
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_page->reloadBehavior->currentIndex()));
|
||||||
if (HostOsInfo::isAnyUnixHost()) {
|
if (HostOsInfo::isAnyUnixHost()) {
|
||||||
ConsoleProcess::setTerminalEmulator(ICore::settings(),
|
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()) {
|
if (!HostOsInfo::isMacHost()) {
|
||||||
UnixUtils::setFileBrowser(ICore::settings(),
|
UnixUtils::setFileBrowser(ICore::settings(),
|
||||||
m_page->externalFileBrowserEdit->text());
|
m_page->externalFileBrowserEdit->text());
|
||||||
@@ -193,7 +203,14 @@ void SystemSettings::finish()
|
|||||||
void SystemSettings::resetTerminal()
|
void SystemSettings::resetTerminal()
|
||||||
{
|
{
|
||||||
if (HostOsInfo::isAnyUnixHost())
|
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()
|
void SystemSettings::resetFileBrowser()
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QMessageBox;
|
class QMessageBox;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils { class TerminalCommand; }
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ private:
|
|||||||
void showHelpForFileBrowser();
|
void showHelpForFileBrowser();
|
||||||
void resetFileBrowser();
|
void resetFileBrowser();
|
||||||
void resetTerminal();
|
void resetTerminal();
|
||||||
|
void updateTerminalUi(const Utils::TerminalCommand &term);
|
||||||
void updatePath();
|
void updatePath();
|
||||||
|
|
||||||
void variableHelpDialogCreator(const QString &helpText);
|
void variableHelpDialogCreator(const QString &helpText);
|
||||||
|
|||||||
@@ -17,68 +17,67 @@
|
|||||||
<string>System</string>
|
<string>System</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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">
|
<widget class="QToolButton" name="helpExternalFileBrowserButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>?</string>
|
<string>?</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="6" column="0" colspan="4">
|
||||||
<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">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoSaveCheckBox">
|
<widget class="QCheckBox" name="autoSaveCheckBox">
|
||||||
@@ -138,140 +137,17 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2">
|
<item row="3" column="0">
|
||||||
<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">
|
|
||||||
<widget class="QLabel" name="patchCommandLabel">
|
<widget class="QLabel" name="patchCommandLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Patch command:</string>
|
<string>Patch command:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoSuspendCheckBox">
|
<widget class="QCheckBox" name="autoSuspendCheckBox">
|
||||||
@@ -337,6 +213,154 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -368,7 +392,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>terminalComboBox</tabstop>
|
|
||||||
<tabstop>resetTerminalButton</tabstop>
|
<tabstop>resetTerminalButton</tabstop>
|
||||||
<tabstop>externalFileBrowserEdit</tabstop>
|
<tabstop>externalFileBrowserEdit</tabstop>
|
||||||
<tabstop>resetFileBrowserButton</tabstop>
|
<tabstop>resetFileBrowserButton</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user