VCS[Perforce]: Add a setting to automatically open files

when attempting to save a file under Perforce.

Reviewed-by: con
Task-number: QTCREATORBUG-1823
This commit is contained in:
Friedemann Kleint
2010-07-09 12:22:58 +02:00
parent 795ae72e0f
commit a96cc1a332
9 changed files with 70 additions and 18 deletions

View File

@@ -34,13 +34,20 @@
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QFlags>
namespace Core {
class CORE_EXPORT IVersionControl : public QObject
{
Q_OBJECT
Q_ENUMS(SettingsFlag Operation)
public:
enum SettingsFlag {
AutoOpen = 0x1
};
Q_DECLARE_FLAGS(SettingsFlags, SettingsFlag)
enum Operation {
AddOperation, DeleteOperation, OpenOperation, MoveOperation,
CreateRepositoryOperation,
@@ -76,6 +83,12 @@ public:
*/
virtual bool vcsOpen(const QString &fileName) = 0;
/*!
* Returns settings.
*/
virtual SettingsFlags settingsFlags() const { return 0; }
/*!
* Called after a file has been added to a project If the version control
* needs to know which files it needs to track you should reimplement this
@@ -137,6 +150,8 @@ signals:
// virtual bool sccManaged(const QString &filename) = 0;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::IVersionControl::SettingsFlags)
} // namespace Core
#endif // IVERSIONCONTROL_H