Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

This commit is contained in:
hjk
2009-01-28 16:55:41 +01:00
8 changed files with 200 additions and 41 deletions

View File

@@ -17,7 +17,7 @@ macx {
QMAKE_INFO_PLIST = $$PWD/qtcreator/Info.plist QMAKE_INFO_PLIST = $$PWD/qtcreator/Info.plist
} }
win32 { win32|linux-* {
# make sure the resources are in place # make sure the resources are in place
!exists($$OUT_PWD/app.pro) { !exists($$OUT_PWD/app.pro) {
unix:SEPARATOR = ; unix:SEPARATOR = ;
@@ -28,10 +28,11 @@ win32 {
designer \ designer \
schemes \ schemes \
gdbmacros gdbmacros
COPYDEST = $${OUT_PWD}/../../bin COPYDEST = $${OUT_PWD}/../../share/qtcreator
win32:COPYDEST ~= s|/+|\| win32:COPYDEST ~= s|/+|\|
QMAKE_POST_LINK += $${QMAKE_MKDIR} $$COPYDEST $$SEPARATOR
for(tmp,COPYSRC) { for(tmp,COPYSRC) {
REALSRC = $$PWD/$$tmp REALSRC = $$PWD/qtcreator/$$tmp
REALDEST = $$COPYDEST/$$tmp REALDEST = $$COPYDEST/$$tmp
win32:tmp ~= s|/+|\| win32:tmp ~= s|/+|\|
win32:REALSRC ~= s|/+|\| win32:REALSRC ~= s|/+|\|

View File

@@ -99,6 +99,7 @@ void ProgressView::deleteTask(FutureProgress *progress)
m_type.remove(progress); m_type.remove(progress);
m_keep.remove(progress); m_keep.remove(progress);
layout()->removeWidget(progress); layout()->removeWidget(progress);
progress->hide();
progress->deleteLater(); progress->deleteLater();
} }

View File

@@ -61,6 +61,8 @@
#include <QtHelp/QHelpEngine> #include <QtHelp/QHelpEngine>
#include <coreplugin/coreconstants.h>
using namespace Help::Internal; using namespace Help::Internal;
namespace { namespace {
@@ -228,20 +230,23 @@ void CentralWidget::setSource(const QUrl &url)
void CentralWidget::setLastShownPages() void CentralWidget::setLastShownPages()
{ {
const QStringList lastShownPageList = helpEngine->customValue(QLatin1String("LastShownPages")). const QStringList lastShownPageList =
toString().split(QLatin1Char('|'), QString::SkipEmptyParts); helpEngine->customValue(QLatin1String("LastShownPages")). toString().
split(QLatin1Char('|'), QString::SkipEmptyParts);
if (!lastShownPageList.isEmpty()) { if (!lastShownPageList.isEmpty()) {
foreach (const QString page, lastShownPageList) foreach (const QString& page, lastShownPageList)
setSourceInNewTab(page); setSourceInNewTab(page);
tabWidget->setCurrentIndex(helpEngine->customValue(QLatin1String("LastTabPage"), 0).toInt()); tabWidget->setCurrentIndex(helpEngine->
customValue(QLatin1String("LastTabPage"), 0).toInt());
} else { } else {
QUrl url = helpEngine->findFile(QUrl("qthelp://com.trolltech.qt.440/qdoc/index.html")); QUrl url(helpEngine->findFile(QUrl("qthelp://com.trolltech.qt.440/qdoc/index.html")));
if (url.isValid()) if (!url.isValid()) {
url.setUrl(QString("qthelp://com.nokia.qtcreator.%1%2/doc/index.html").
arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR));
}
setSource(url); setSource(url);
else
setSource(QUrl("qthelp://com.trolltech.qt.440/qdoc/index.html"));
} }
updateBrowserFont(); updateBrowserFont();
@@ -392,19 +397,33 @@ void CentralWidget::setGlobalActions(const QList<QAction*> &actions)
{ {
globalActionList = actions; globalActionList = actions;
} }
void CentralWidget::setSourceInNewTab(const QUrl &url) void CentralWidget::setSourceInNewTab(const QUrl &url)
{ {
HelpViewer* viewer = new HelpViewer(helpEngine, this); HelpViewer* viewer = new HelpViewer(helpEngine, this);
viewer->installEventFilter(this); viewer->installEventFilter(this);
viewer->setSource(url); viewer->setSource(url);
viewer->setFocus(Qt::OtherFocusReason); viewer->setFocus(Qt::OtherFocusReason);
tabWidget->setCurrentIndex(tabWidget->addTab(viewer, viewer->documentTitle())); tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
quoteTabTitle(viewer->documentTitle())));
#if defined(QT_NO_WEBIT)
QFont font = qApp->font(); QFont font = qApp->font();
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool()) if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont"))); font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
viewer->setFont(font); viewer->setFont(font);
#else
QWebView* view = qobject_cast<QWebView*> (viewer);
if (view) {
QWebSettings* settings = QWebSettings::globalSettings();
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
settings = view->settings();
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
}
#endif
connectSignals(); connectSignals();
} }
@@ -595,6 +614,7 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e)
void CentralWidget::updateBrowserFont() void CentralWidget::updateBrowserFont()
{ {
#if defined(QT_NO_WEBKIT)
QFont font = qApp->font(); QFont font = qApp->font();
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool()) if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont"))); font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
@@ -605,9 +625,25 @@ void CentralWidget::updateBrowserFont()
if (widget->font() != font) if (widget->font() != font)
widget->setFont(font); widget->setFont(font);
} }
#else
QWebSettings* settings = QWebSettings::globalSettings();
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
QWebView* widget = 0;
for (int i = 0; i < tabWidget->count(); ++i) {
widget = qobject_cast<QWebView*> (tabWidget->widget(i));
if (widget) {
settings = widget->settings();
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
}
}
#endif
} }
bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags, bool incremental) bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
bool incremental)
{ {
HelpViewer* viewer = currentHelpViewer(); HelpViewer* viewer = currentHelpViewer();

View File

@@ -518,10 +518,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R")));
mbuild->addAction(cmd, Constants::G_BUILD_RUN); mbuild->addAction(cmd, Constants::G_BUILD_RUN);
m_runActionContextMenu = new QAction(runIcon, tr("Run"), this);
cmd = am->registerAction(m_runActionContextMenu, Constants::RUNCONTEXTMENU, globalcontext);
mproject->addAction(cmd, Constants::G_PROJECT_RUN);
Core::ActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU); Core::ActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU);
m_runConfigurationMenu = mrc->menu(); m_runConfigurationMenu = mrc->menu();
m_runConfigurationMenu->setTitle(tr("Set Run Configuration")); m_runConfigurationMenu->setTitle(tr("Set Run Configuration"));
@@ -535,6 +531,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
modeManager->addAction(cmd, Constants::P_ACTION_RUN, m_runConfigurationMenu); modeManager->addAction(cmd, Constants::P_ACTION_RUN, m_runConfigurationMenu);
m_runActionContextMenu = new QAction(runIcon, tr("Run"), this);
cmd = am->registerAction(m_runActionContextMenu, Constants::RUNCONTEXTMENU, globalcontext);
mproject->addAction(cmd, Constants::G_PROJECT_RUN);
// jump to next task // jump to next task
m_taskAction = new QAction(tr("Go to Task Window"), this); m_taskAction = new QAction(tr("Go to Task Window"), this);
m_taskAction->setIcon(QIcon(Core::Constants::ICON_NEXT)); m_taskAction->setIcon(QIcon(Core::Constants::ICON_NEXT));

View File

@@ -104,6 +104,7 @@ bool QMakeStep::init(const QString &name)
m_buildConfiguration = name; m_buildConfiguration = name;
const QtVersion *qtVersion = m_pro->qtVersion(name); const QtVersion *qtVersion = m_pro->qtVersion(name);
if (!qtVersion->isValid()) { if (!qtVersion->isValid()) {
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
emit addToOutputWindow(tr("\n<font color=\"#ff0000\"><b>No valid Qt version set. Set one in Preferences </b></font>\n")); emit addToOutputWindow(tr("\n<font color=\"#ff0000\"><b>No valid Qt version set. Set one in Preferences </b></font>\n"));

View File

@@ -46,6 +46,7 @@
#include <QtGui/QFormLayout> #include <QtGui/QFormLayout>
#include <QtGui/QInputDialog> #include <QtGui/QInputDialog>
#include <QtGui/QLabel>
using namespace Qt4ProjectManager::Internal; using namespace Qt4ProjectManager::Internal;
using namespace Qt4ProjectManager; using namespace Qt4ProjectManager;
@@ -54,17 +55,27 @@ using ProjectExplorer::PersistentSettingsReader;
using ProjectExplorer::PersistentSettingsWriter; using ProjectExplorer::PersistentSettingsWriter;
Qt4RunConfiguration::Qt4RunConfiguration(Qt4Project *pro, QString proFilePath) Qt4RunConfiguration::Qt4RunConfiguration(Qt4Project *pro, QString proFilePath)
: ApplicationRunConfiguration(pro), m_proFilePath(proFilePath), m_userSetName(false) : ApplicationRunConfiguration(pro),
m_proFilePath(proFilePath),
m_userSetName(false),
m_configWidget(0),
m_executableLabel(0),
m_workingDirectoryLabel(0)
{ {
setName(tr("Qt4RunConfiguration")); setName(tr("Qt4RunConfiguration"));
if (!m_proFilePath.isEmpty()) { if (!m_proFilePath.isEmpty()) {
updateCachedValues(); updateCachedValues();
setName(QFileInfo(m_proFilePath).baseName()); setName(QFileInfo(m_proFilePath).baseName());
} }
connect(pro, SIGNAL(activeBuildConfigurationChanged()),
this, SIGNAL(effectiveExecutableChanged()));
connect(pro, SIGNAL(activeBuildConfigurationChanged()),
this, SIGNAL(effectiveWorkingDirectoryChanged()));
} }
Qt4RunConfiguration::~Qt4RunConfiguration() Qt4RunConfiguration::~Qt4RunConfiguration()
{ {
} }
QString Qt4RunConfiguration::type() const QString Qt4RunConfiguration::type() const
@@ -72,37 +83,92 @@ QString Qt4RunConfiguration::type() const
return "Qt4ProjectManager.Qt4RunConfiguration"; return "Qt4ProjectManager.Qt4RunConfiguration";
} }
QWidget *Qt4RunConfiguration::configurationWidget()
//////
/// Qt4RunConfigurationWidget
/////
Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4RunConfiguration, QWidget *parent)
: QWidget(parent), m_qt4RunConfiguration(qt4RunConfiguration), m_ignoreChange(false)
{ {
QWidget *configWidget = new QWidget; QFormLayout *toplayout = new QFormLayout(this);
QFormLayout *toplayout = new QFormLayout(configWidget);
toplayout->setMargin(0); toplayout->setMargin(0);
QLabel *nameLabel = new QLabel(tr("Name:")); QLabel *nameLabel = new QLabel(tr("Name:"));
QLineEdit *nameLineEdit = new QLineEdit(name()); m_nameLineEdit = new QLineEdit(m_qt4RunConfiguration->name());
nameLabel->setBuddy(nameLineEdit); nameLabel->setBuddy(m_nameLineEdit);
toplayout->addRow(nameLabel, nameLineEdit); toplayout->addRow(nameLabel, m_nameLineEdit);
QLabel *executableLabel = new QLabel(tr("Executable:")); m_executableLabel = new QLabel(m_qt4RunConfiguration->executable());
QLabel *executableLabel2 = new QLabel(executable()); toplayout->addRow(tr("Executable:"), m_executableLabel);
toplayout->addRow(executableLabel, executableLabel2);
QLabel *workingDirectoryLabel = new QLabel(tr("Working Directory:")); m_workingDirectoryLabel = new QLabel(m_qt4RunConfiguration->workingDirectory());
QLabel *workingDirectoryLabel2 = new QLabel(workingDirectory()); toplayout->addRow(tr("Working Directory:"), m_workingDirectoryLabel);
toplayout->addRow(workingDirectoryLabel, workingDirectoryLabel2);
QLabel *argumentsLabel = new QLabel(tr("&Arguments:")); QLabel *argumentsLabel = new QLabel(tr("&Arguments:"));
QLineEdit *argumentsLineEdit = new QLineEdit(ProjectExplorer::Environment::joinArgumentList(commandLineArguments())); m_argumentsLineEdit = new QLineEdit(ProjectExplorer::Environment::joinArgumentList(qt4RunConfiguration->commandLineArguments()));
argumentsLabel->setBuddy(argumentsLineEdit); argumentsLabel->setBuddy(m_argumentsLineEdit);
toplayout->addRow(argumentsLabel, argumentsLineEdit); toplayout->addRow(argumentsLabel, m_argumentsLineEdit);
connect(argumentsLineEdit, SIGNAL(textEdited(const QString&)), connect(m_argumentsLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(setCommandLineArguments(const QString&))); this, SLOT(setCommandLineArguments(const QString&)));
connect(nameLineEdit, SIGNAL(textEdited(const QString&)), connect(m_nameLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(nameEdited(const QString&))); this, SLOT(nameEdited(const QString&)));
return configWidget; connect(qt4RunConfiguration, SIGNAL(commandLineArgumentsChanged(QString)),
this, SLOT(commandLineArgumentsChanged(QString)));
connect(qt4RunConfiguration, SIGNAL(nameChanged(QString)),
this, SLOT(nameChanged(QString)));
connect(qt4RunConfiguration, SIGNAL(effectiveExecutableChanged()),
this, SLOT(effectiveExecutableChanged()));
connect(qt4RunConfiguration, SIGNAL(effectiveWorkingDirectoryChanged()),
this, SLOT(effectiveWorkingDirectoryChanged()));
}
void Qt4RunConfigurationWidget::setCommandLineArguments(const QString &args)
{
m_ignoreChange = true;
m_qt4RunConfiguration->setCommandLineArguments(args);
m_ignoreChange = false;
}
void Qt4RunConfigurationWidget::nameEdited(const QString &name)
{
m_ignoreChange = true;
m_qt4RunConfiguration->nameEdited(name);
m_ignoreChange = false;
}
void Qt4RunConfigurationWidget::commandLineArgumentsChanged(const QString &args)
{
if (!m_ignoreChange)
m_argumentsLineEdit->setText(args);
}
void Qt4RunConfigurationWidget::nameChanged(const QString &name)
{
if (!m_ignoreChange)
m_nameLineEdit->setText(name);
}
void Qt4RunConfigurationWidget::effectiveExecutableChanged()
{
m_executableLabel->setText(m_qt4RunConfiguration->executable());
}
void Qt4RunConfigurationWidget::effectiveWorkingDirectoryChanged()
{
m_workingDirectoryLabel->setText(m_qt4RunConfiguration->workingDirectory());
}
////// TODO c&p above
QWidget *Qt4RunConfiguration::configurationWidget()
{
return new Qt4RunConfigurationWidget(this, 0);
} }
void Qt4RunConfiguration::save(PersistentSettingsWriter &writer) const void Qt4RunConfiguration::save(PersistentSettingsWriter &writer) const
@@ -156,6 +222,7 @@ ProjectExplorer::Environment Qt4RunConfiguration::environment() const
void Qt4RunConfiguration::setCommandLineArguments(const QString &argumentsString) void Qt4RunConfiguration::setCommandLineArguments(const QString &argumentsString)
{ {
m_commandLineArguments = ProjectExplorer::Environment::parseCombinedArgString(argumentsString); m_commandLineArguments = ProjectExplorer::Environment::parseCombinedArgString(argumentsString);
emit commandLineArgumentsChanged(argumentsString);
} }
void Qt4RunConfiguration::nameEdited(const QString &name) void Qt4RunConfiguration::nameEdited(const QString &name)
@@ -167,6 +234,7 @@ void Qt4RunConfiguration::nameEdited(const QString &name)
setName(name); setName(name);
m_userSetName = true; m_userSetName = true;
} }
emit nameChanged(name);
} }
QString Qt4RunConfiguration::proFilePath() const QString Qt4RunConfiguration::proFilePath() const
@@ -222,6 +290,9 @@ void Qt4RunConfiguration::updateCachedValues()
m_runMode = ProjectExplorer::ApplicationRunConfiguration::Gui; m_runMode = ProjectExplorer::ApplicationRunConfiguration::Gui;
delete reader; delete reader;
emit effectiveExecutableChanged();
emit effectiveWorkingDirectoryChanged();
} }
QString Qt4RunConfiguration::resolveVariables(const QString &buildConfiguration, const QString& in) const QString Qt4RunConfiguration::resolveVariables(const QString &buildConfiguration, const QString& in) const
@@ -310,7 +381,7 @@ QString Qt4RunConfiguration::qmakeBuildConfigFromBuildConfiguration(const QStrin
else else
return "release"; return "release";
} else { } else {
// Old sytle always CONFIG+=debug_and_release // Old style always CONFIG+=debug_and_release
if (qobject_cast<Qt4Project *>(project())->qtVersion(buildConfigurationName)->defaultBuildConfig() & QtVersion::DebugBuild) if (qobject_cast<Qt4Project *>(project())->qtVersion(buildConfigurationName)->defaultBuildConfig() & QtVersion::DebugBuild)
return "debug"; return "debug";
else else

View File

@@ -36,6 +36,11 @@
#include <projectexplorer/applicationrunconfiguration.h> #include <projectexplorer/applicationrunconfiguration.h>
#include <QtCore/QStringList> #include <QtCore/QStringList>
#include <QtGui/QWidget>
class QWidget;
class QLabel;
class QLineEdit;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
@@ -45,9 +50,13 @@ namespace Internal {
class Qt4ProFileNode; class Qt4ProFileNode;
class Qt4RunConfiguration : public ProjectExplorer::ApplicationRunConfiguration class Qt4RunConfiguration : public ProjectExplorer::ApplicationRunConfiguration
{ {
Q_OBJECT Q_OBJECT
// to change the name and arguments
friend class Qt4RunConfigurationWidget;
public: public:
Qt4RunConfiguration(Qt4Project *pro, QString proFilePath); Qt4RunConfiguration(Qt4Project *pro, QString proFilePath);
virtual ~Qt4RunConfiguration(); virtual ~Qt4RunConfiguration();
@@ -68,6 +77,14 @@ public:
// Should just be called from qt4project, since that knows that the file changed on disc // Should just be called from qt4project, since that knows that the file changed on disc
void updateCachedValues(); void updateCachedValues();
signals:
void nameChanged(const QString&);
void commandLineArgumentsChanged(const QString&);
// note those signals might not emited for every change
void effectiveExecutableChanged();
void effectiveWorkingDirectoryChanged();
private slots: private slots:
void setCommandLineArguments(const QString &argumentsString); void setCommandLineArguments(const QString &argumentsString);
void nameEdited(const QString&); void nameEdited(const QString&);
@@ -88,6 +105,31 @@ private:
QString m_workingDir; QString m_workingDir;
ProjectExplorer::ApplicationRunConfiguration::RunMode m_runMode; ProjectExplorer::ApplicationRunConfiguration::RunMode m_runMode;
bool m_userSetName; bool m_userSetName;
QWidget *m_configWidget;
QLabel *m_executableLabel;
QLabel *m_workingDirectoryLabel;
};
class Qt4RunConfigurationWidget : public QWidget
{
Q_OBJECT
public:
Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4runconfigration, QWidget *parent);
private slots:
void setCommandLineArguments(const QString &arguments);
void nameEdited(const QString &name);
// TODO connect to signals from qt4runconfiguration for changed arguments and names
void commandLineArgumentsChanged(const QString &args);
void nameChanged(const QString &name);
void effectiveExecutableChanged();
void effectiveWorkingDirectoryChanged();
private:
Qt4RunConfiguration *m_qt4RunConfiguration;
bool m_ignoreChange;
QLabel *m_executableLabel;
QLabel *m_workingDirectoryLabel;
QLineEdit *m_nameLineEdit;
QLineEdit *m_argumentsLineEdit;
}; };
class Qt4RunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory class Qt4RunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory

View File

@@ -151,21 +151,28 @@ void QrcEditor::updateCurrent()
const bool isValid = m_treeview->currentIndex().isValid(); const bool isValid = m_treeview->currentIndex().isValid();
const bool isPrefix = m_treeview->isPrefix(m_treeview->currentIndex()) && isValid; const bool isPrefix = m_treeview->isPrefix(m_treeview->currentIndex()) && isValid;
const bool isFile = !isPrefix && isValid; const bool isFile = !isPrefix && isValid;
int cursorPosition;
m_ui.aliasLabel->setEnabled(isFile); m_ui.aliasLabel->setEnabled(isFile);
m_ui.aliasText->setEnabled(isFile); m_ui.aliasText->setEnabled(isFile);
m_currentAlias = m_treeview->currentAlias(); m_currentAlias = m_treeview->currentAlias();
cursorPosition = m_ui.aliasText->cursorPosition();
m_ui.aliasText->setText(m_currentAlias); m_ui.aliasText->setText(m_currentAlias);
m_ui.aliasText->setCursorPosition(cursorPosition);
m_ui.prefixLabel->setEnabled(isPrefix); m_ui.prefixLabel->setEnabled(isPrefix);
m_ui.prefixText->setEnabled(isPrefix); m_ui.prefixText->setEnabled(isPrefix);
m_currentPrefix = m_treeview->currentPrefix(); m_currentPrefix = m_treeview->currentPrefix();
cursorPosition = m_ui.prefixText->cursorPosition();
m_ui.prefixText->setText(m_currentPrefix); m_ui.prefixText->setText(m_currentPrefix);
m_ui.prefixText->setCursorPosition(cursorPosition);
m_ui.languageLabel->setEnabled(isPrefix); m_ui.languageLabel->setEnabled(isPrefix);
m_ui.languageText->setEnabled(isPrefix); m_ui.languageText->setEnabled(isPrefix);
m_currentLanguage = m_treeview->currentLanguage(); m_currentLanguage = m_treeview->currentLanguage();
cursorPosition = m_ui.languageText->cursorPosition();
m_ui.languageText->setText(m_currentLanguage); m_ui.languageText->setText(m_currentLanguage);
m_ui.languageText->setCursorPosition(cursorPosition);
m_ui.addButton->setEnabled(true); m_ui.addButton->setEnabled(true);
m_addFileAction->setEnabled(isValid); m_addFileAction->setEnabled(isValid);