forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user