Commit 13232879 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Some reformatting to improve readability

parent ff3fe49a
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include <coreplugin/uniqueidmanager.h> #include <coreplugin/uniqueidmanager.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <QtDebug>
using namespace GenericProjectManager; using namespace GenericProjectManager;
using namespace GenericProjectManager::Internal; using namespace GenericProjectManager::Internal;
...@@ -14,6 +12,7 @@ using namespace GenericProjectManager::Internal; ...@@ -14,6 +12,7 @@ using namespace GenericProjectManager::Internal;
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// ProjectFilesEditable // ProjectFilesEditable
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
ProjectFilesFactory::ProjectFilesFactory(Manager *manager, ProjectFilesFactory::ProjectFilesFactory(Manager *manager,
TextEditor::TextEditorActionHandler *handler) TextEditor::TextEditorActionHandler *handler)
: Core::IEditorFactory(manager), : Core::IEditorFactory(manager),
...@@ -26,10 +25,13 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager, ...@@ -26,10 +25,13 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager,
} }
ProjectFilesFactory::~ProjectFilesFactory() ProjectFilesFactory::~ProjectFilesFactory()
{ } {
}
Manager *ProjectFilesFactory::manager() const Manager *ProjectFilesFactory::manager() const
{ return _manager; } {
return _manager;
}
Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent) Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
{ {
...@@ -39,10 +41,14 @@ Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent) ...@@ -39,10 +41,14 @@ Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
} }
QStringList ProjectFilesFactory::mimeTypes() const QStringList ProjectFilesFactory::mimeTypes() const
{ return _mimeTypes; } {
return _mimeTypes;
}
QString ProjectFilesFactory::kind() const QString ProjectFilesFactory::kind() const
{ return QLatin1String(Constants::FILES_EDITOR); } {
return QLatin1String(Constants::FILES_EDITOR);
}
Core::IFile *ProjectFilesFactory::open(const QString &fileName) Core::IFile *ProjectFilesFactory::open(const QString &fileName)
{ {
...@@ -57,6 +63,7 @@ Core::IFile *ProjectFilesFactory::open(const QString &fileName) ...@@ -57,6 +63,7 @@ Core::IFile *ProjectFilesFactory::open(const QString &fileName)
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// ProjectFilesEditable // ProjectFilesEditable
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
ProjectFilesEditable::ProjectFilesEditable(ProjectFilesEditor *editor) ProjectFilesEditable::ProjectFilesEditable(ProjectFilesEditor *editor)
: TextEditor::BaseTextEditorEditable(editor) : TextEditor::BaseTextEditorEditable(editor)
{ {
...@@ -68,13 +75,19 @@ ProjectFilesEditable::~ProjectFilesEditable() ...@@ -68,13 +75,19 @@ ProjectFilesEditable::~ProjectFilesEditable()
{ } { }
QList<int> ProjectFilesEditable::context() const QList<int> ProjectFilesEditable::context() const
{ return _context; } {
return _context;
}
const char *ProjectFilesEditable::kind() const const char *ProjectFilesEditable::kind() const
{ return Constants::FILES_EDITOR; } {
return Constants::FILES_EDITOR;
}
bool ProjectFilesEditable::duplicateSupported() const bool ProjectFilesEditable::duplicateSupported() const
{ return true; } {
return true;
}
Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent) Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent)
{ {
...@@ -83,13 +96,12 @@ Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent) ...@@ -83,13 +96,12 @@ Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent)
parentEditor->factory(), parentEditor->factory(),
parentEditor->actionHandler()); parentEditor->actionHandler());
return editor->editableInterface(); return editor->editableInterface();
} }
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// ProjectFilesEditor // ProjectFilesEditor
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
ProjectFilesEditor::ProjectFilesEditor(QWidget *parent, ProjectFilesFactory *factory, ProjectFilesEditor::ProjectFilesEditor(QWidget *parent, ProjectFilesFactory *factory,
TextEditor::TextEditorActionHandler *handler) TextEditor::TextEditorActionHandler *handler)
: TextEditor::BaseTextEditor(parent), : TextEditor::BaseTextEditor(parent),
...@@ -105,17 +117,24 @@ ProjectFilesEditor::~ProjectFilesEditor() ...@@ -105,17 +117,24 @@ ProjectFilesEditor::~ProjectFilesEditor()
{ } { }
ProjectFilesFactory *ProjectFilesEditor::factory() const ProjectFilesFactory *ProjectFilesEditor::factory() const
{ return _factory; } {
return _factory;
}
TextEditor::TextEditorActionHandler *ProjectFilesEditor::actionHandler() const TextEditor::TextEditorActionHandler *ProjectFilesEditor::actionHandler() const
{ return _actionHandler; } {
return _actionHandler;
}
TextEditor::BaseTextEditorEditable *ProjectFilesEditor::createEditableInterface() TextEditor::BaseTextEditorEditable *ProjectFilesEditor::createEditableInterface()
{ return new ProjectFilesEditable(this); } {
return new ProjectFilesEditable(this);
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// ProjectFilesDocument // ProjectFilesDocument
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
ProjectFilesDocument::ProjectFilesDocument(Manager *manager) ProjectFilesDocument::ProjectFilesDocument(Manager *manager)
: _manager(manager) : _manager(manager)
{ {
......
...@@ -52,18 +52,25 @@ class PROJECTEXPLORER_EXPORT CustomExecutableRunConfiguration : public Applicati ...@@ -52,18 +52,25 @@ class PROJECTEXPLORER_EXPORT CustomExecutableRunConfiguration : public Applicati
// the configuration widget needs to setExecutable setWorkingDirectory and setCommandLineArguments // the configuration widget needs to setExecutable setWorkingDirectory and setCommandLineArguments
friend class Internal::CustomExecutableConfigurationWidget; friend class Internal::CustomExecutableConfigurationWidget;
Q_OBJECT Q_OBJECT
public: public:
CustomExecutableRunConfiguration(Project *pro); CustomExecutableRunConfiguration(Project *pro);
~CustomExecutableRunConfiguration(); ~CustomExecutableRunConfiguration();
virtual QString type() const; virtual QString type() const;
// returns the executable,
// looks in the environment for it /**
// and might even ask the user if none is specified * Returns the executable, looks in the environment for it and might even
* ask the user if none is specified
*/
virtual QString executable() const; virtual QString executable() const;
// Returns only what is stored in the internal variable
// not what we might get after extending it with a path /**
// or asking the user. This value is needed for the configuration widget * Returns only what is stored in the internal variable, not what we might
* get after extending it with a path or asking the user. This value is
* needed for the configuration widget.
*/
QString baseExecutable() const; QString baseExecutable() const;
virtual ApplicationRunConfiguration::RunMode runMode() const; virtual ApplicationRunConfiguration::RunMode runMode() const;
virtual QString workingDirectory() const; virtual QString workingDirectory() const;
QString baseWorkingDirectory() const; QString baseWorkingDirectory() const;
...@@ -74,8 +81,10 @@ public: ...@@ -74,8 +81,10 @@ public:
virtual void restore(const PersistentSettingsReader &reader); virtual void restore(const PersistentSettingsReader &reader);
virtual QWidget *configurationWidget(); virtual QWidget *configurationWidget();
signals: signals:
void changed(); void changed();
private: private:
void setExecutable(const QString &executable); void setExecutable(const QString &executable);
void setCommandLineArguments(const QString &commandLineArguments); void setCommandLineArguments(const QString &commandLineArguments);
...@@ -90,6 +99,7 @@ private: ...@@ -90,6 +99,7 @@ private:
class CustomExecutableRunConfigurationFactory : public IRunConfigurationFactory class CustomExecutableRunConfigurationFactory : public IRunConfigurationFactory
{ {
Q_OBJECT Q_OBJECT
public: public:
CustomExecutableRunConfigurationFactory(); CustomExecutableRunConfigurationFactory();
virtual ~CustomExecutableRunConfigurationFactory(); virtual ~CustomExecutableRunConfigurationFactory();
...@@ -101,11 +111,14 @@ public: ...@@ -101,11 +111,14 @@ public:
}; };
namespace Internal { namespace Internal {
class CustomExecutableConfigurationWidget : public QWidget class CustomExecutableConfigurationWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc); CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc);
private slots: private slots:
void changed(); void changed();
...@@ -113,6 +126,7 @@ private slots: ...@@ -113,6 +126,7 @@ private slots:
void setCommandLineArguments(const QString &commandLineArguments); void setCommandLineArguments(const QString &commandLineArguments);
void setWorkingDirectory(); void setWorkingDirectory();
void termToggled(bool); void termToggled(bool);
private: private:
bool m_ignoreChange; bool m_ignoreChange;
CustomExecutableRunConfiguration *m_runConfiguration; CustomExecutableRunConfiguration *m_runConfiguration;
...@@ -121,7 +135,8 @@ private: ...@@ -121,7 +135,8 @@ private:
Core::Utils::PathChooser *m_workingDirectory; Core::Utils::PathChooser *m_workingDirectory;
QCheckBox *m_useTerminalCheck; QCheckBox *m_useTerminalCheck;
}; };
}
} } // namespace Internal
} // namespace ProjectExplorer
#endif // CUSTOMEXECUTABLERUNCONFIGURATION_H #endif // CUSTOMEXECUTABLERUNCONFIGURATION_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment