forked from qt-creator/qt-creator
Fixes: Progress to the cmake plugin
Details: Add a dialog asking for command line options and build directory. This dialog pops up if you don't have a .user file. Note, though that it also pops up if there is already a in source build. (The build directory lineedit should be read only then.) The cmake button in that dialog and the output pane need more polish to make them better. With those changes you can now build and run marble from Qt Creator. (For marble you need to pass a few options to cmake.) Also add a configuration page to the Tools/Options dialog, where you can specify the cmake executable path. And add a class which runs cmake in the background to find out which version and wheter that cmake version has Qt Creator generator. (Which I did begin to write.)
This commit is contained in:
@@ -37,11 +37,15 @@
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <projectexplorer/iprojectmanager.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <QtCore/QFuture>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QDir>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class CMakeSettingsPage;
|
||||
class CMakeRunner;
|
||||
|
||||
class CMakeManager : public ProjectExplorer::IProjectManager
|
||||
{
|
||||
@@ -52,16 +56,37 @@ public:
|
||||
virtual int projectContext() const;
|
||||
virtual int projectLanguage() const;
|
||||
|
||||
//virtual bool canOpenProject(const QString &fileName);
|
||||
virtual ProjectExplorer::Project *openProject(const QString &fileName);
|
||||
virtual QString mimeType() const;
|
||||
//virtual QString fileFilter() const;
|
||||
QString cmakeExecutable() const;
|
||||
|
||||
QString createXmlFile(const QStringList &arguments, const QString &sourceDirectory, const QDir &buildDirectory);
|
||||
private:
|
||||
int m_projectContext;
|
||||
int m_projectLanguage;
|
||||
CMakeSettingsPage *m_settingsPage;
|
||||
};
|
||||
|
||||
class CMakeRunner
|
||||
{
|
||||
public:
|
||||
CMakeRunner();
|
||||
void run(QFutureInterface<void> &fi);
|
||||
void setExecutable(const QString &executable);
|
||||
QString executable() const;
|
||||
QString version() const;
|
||||
bool supportsQtCreator() const;
|
||||
void waitForUpToDate() const;
|
||||
|
||||
private:
|
||||
QString m_executable;
|
||||
QString m_version;
|
||||
bool m_supportsQtCreator;
|
||||
bool m_cacheUpToDate;
|
||||
mutable QFuture<void> m_future;
|
||||
mutable QMutex m_mutex;
|
||||
};
|
||||
|
||||
class CMakeSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -82,9 +107,8 @@ private:
|
||||
void updateCachedInformation() const;
|
||||
void saveSettings() const;
|
||||
QString findCmakeExecutable() const;
|
||||
mutable QString m_cmakeExecutable;
|
||||
mutable QString m_version;
|
||||
mutable bool m_supportsQtCreator;
|
||||
|
||||
mutable CMakeRunner m_cmakeRunner;
|
||||
Core::Utils::PathChooser *m_pathchooser;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user