Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes crash on save when model directory is open in Explorer on Windows #197

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ build_profile/
build-profile/
core-build/
super-build/
debug/
release/
/super-build-shared/
/super-build-static/

Expand Down
2 changes: 1 addition & 1 deletion src/.clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Language: Cpp
AccessModifierOffset: -4
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
Expand Down
8 changes: 4 additions & 4 deletions src/bimserver/BIMserverConnection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class BIMSERVER_API BIMserverConnection : public QObject
{
Q_OBJECT

public:
public:
/// Default constructor
BIMserverConnection(QObject* parent, QString bimserverAddr, QString bimserverPort);
/// destructor
Expand Down Expand Up @@ -102,7 +102,7 @@ class BIMSERVER_API BIMserverConnection : public QObject
/// get all revisions of IFC files of a project, Blocked
boost::optional<QStringList> getIFCRevisionListBlocked(QString projectID, int timeout);

signals:
signals:
/// send the retrieved osmString to GUI
void osmStringRetrieved(QString osmString);

Expand All @@ -121,7 +121,7 @@ class BIMSERVER_API BIMserverConnection : public QObject
///emit error if BIMserver is not setup correctly.
void bimserverError();

private slots:
private slots:
//slots used by this class only
/// log in to BIMserver
void processLoginRequest(QNetworkReply* rep);
Expand All @@ -146,7 +146,7 @@ class BIMSERVER_API BIMserverConnection : public QObject
/// get download progress
void processGetProgressRequest();

private:
private:
REGISTER_LOGGER("openstudio.BIMserverConnection");

void sendLoginRequest();
Expand Down
10 changes: 5 additions & 5 deletions src/bimserver/ProjectImporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BIMSERVER_API ProjectImporter : public QDialog
{
Q_OBJECT

public:
public:
/// Default constructor
ProjectImporter(QWidget* parent);

Expand All @@ -67,11 +67,11 @@ class BIMSERVER_API ProjectImporter : public QDialog
/// Reimplemented the key press event of ESC and guide it to the run() function
void keyPressEvent(QKeyEvent* event) override;

signals:
signals:
/// OSM String is retrieved.
void finished();

public slots:
public slots:

/// Takes projectList from BIMserverConnection and prints out projects
void processProjectList(QStringList projectList);
Expand All @@ -86,7 +86,7 @@ class BIMSERVER_API ProjectImporter : public QDialog
/// process if BIMserver is not connected.
void processBIMserverErrors();

private:
private:
BIMserverConnection* m_bimserverConnection;
QSettings* m_settings;

Expand All @@ -102,7 +102,7 @@ class BIMSERVER_API ProjectImporter : public QDialog
QPushButton* m_loadButton;
QPushButton* m_selectButton;

private slots:
private slots:

void okButton_clicked();
void newButton_clicked();
Expand Down
2 changes: 1 addition & 1 deletion src/bimserver/Test/BIMserverFixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

class BIMserverFixture : public ::testing::Test
{
protected:
protected:
/// initialize for each test
virtual void SetUp() override;

Expand Down
6 changes: 3 additions & 3 deletions src/model_editor/AccessPolicyStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ AccessPolicyStore* AccessPolicyStore::s_instance = nullptr;
//XML Parser
class AccessParser : public QXmlDefaultHandler
{
public:
public:
AccessParser();

protected:
protected:
bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts) override;

bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName) override;

bool error(QXmlParseException&);
bool fatalError(QXmlParseException&);

private:
private:
AccessPolicy* m_curPolicy;
IddObjectType m_curType;
IddFileAndFactoryWrapper m_factory;
Expand Down
10 changes: 5 additions & 5 deletions src/model_editor/AccessPolicyStore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MODELEDITOR_API AccessPolicy
friend class AccessParser;
friend class openstudio::InspectorView; // For overriding via setAccess

public:
public:
/*! tells the ModelObect how to sort its fields for display in a GUI*/
enum ACCESS_LEVEL
{
Expand All @@ -84,11 +84,11 @@ class MODELEDITOR_API AccessPolicy
*/
ACCESS_LEVEL getAccess(unsigned int index) const;

protected:
protected:
// For specific overriding of access policies, such as hiding Fan Schedule only on AirLoopHVAC for eg
bool setAccess(unsigned int index, ACCESS_LEVEL);

private:
private:
std::map<unsigned int, ACCESS_LEVEL> m_accessMap;
unsigned int m_numNormalFields;
unsigned int m_extensibleSize;
Expand All @@ -103,7 +103,7 @@ class MODELEDITOR_API AccessPolicyStore
{
friend class AccessParser;

public:
public:
static AccessPolicyStore& Instance();

/*! loads an xml with the policy rules
Expand All @@ -118,7 +118,7 @@ class MODELEDITOR_API AccessPolicyStore
/* clear the map*/
void clear();

private:
private:
AccessPolicyStore();
~AccessPolicyStore();
AccessPolicyStore(const AccessPolicyStore&);
Expand Down
4 changes: 2 additions & 2 deletions src/model_editor/Application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ApplicationSingleton

friend class Singleton<ApplicationSingleton>;

public:
public:
/// get the QApplication, if no QApplication has been set this will create a default one
QCoreApplication* application(bool gui = true);

Expand Down Expand Up @@ -96,7 +96,7 @@ class ApplicationSingleton

~ApplicationSingleton();

private:
private:
/// private constructor
ApplicationSingleton();

Expand Down
8 changes: 4 additions & 4 deletions src/model_editor/BridgeClasses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ class MODELEDITOR_API ComboHighlightBridge : public QObject

Q_OBJECT;

public:
public:
ComboHighlightBridge(QObject* parent);

QObject* bridgeSender();

public slots:
public slots:
void highlighted(const QString& val);
void activated(const QString& val);
signals:
signals:
void highlightEmitted(const QString& val);
void activatedEmitted(const QString& val);

private:
private:
QObject* m_source; //original source object
};

Expand Down
10 changes: 5 additions & 5 deletions src/model_editor/ClassViewWidget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ClassViewWidget : public ViewWidget
{
Q_OBJECT

public:
public:
ClassViewWidget(openstudio::model::Model& model, QWidget* parent = nullptr);
ClassViewWidget(QWidget* parent = nullptr);
virtual ~ClassViewWidget();
Expand All @@ -62,18 +62,18 @@ class ClassViewWidget : public ViewWidget
TableModel* getTableModel();
virtual void toggleGUIDs() override;

public slots:
public slots:
virtual void viewSelection(const QModelIndex& modelIndex) override;
virtual void on_nameChanged(QString) override;
virtual void viewSelection();

signals:
signals:

protected:
protected:
TableView* mTableView;
TableModel* mTableModel;

private:
private:
virtual void createWidgets() override;
virtual void connectSignalsAndSlots() override;
virtual void createLayout() override;
Expand Down
10 changes: 5 additions & 5 deletions src/model_editor/EditorFrame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ class MODELEDITOR_API EditorFrame : public QMainWindow
{
Q_OBJECT

public:
public:
EditorFrame(QWidget* parent = nullptr);
virtual ~EditorFrame();
void loadStyleSheet(QString& style);

protected:
protected:
void closeEvent(QCloseEvent* event) override;

private:
private:
void connectSignalsAndSlots();
void contextMenuEvent(QContextMenuEvent* event) override;
void createActions();
Expand Down Expand Up @@ -132,7 +132,7 @@ class MODELEDITOR_API EditorFrame : public QMainWindow
bool mShowComments;
bool mShowPrecision;

private slots:
private slots:
void about();

void newIdk();
Expand Down Expand Up @@ -163,7 +163,7 @@ class MODELEDITOR_API EditorFrame : public QMainWindow
void on_precisionDlgHidden();
void on_precisionDlgFinished();

signals:
signals:
};

} // namespace modeleditor
Expand Down
8 changes: 4 additions & 4 deletions src/model_editor/IGLineEdit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MODELEDITOR_API IGLineEdit : public QLineEdit
Q_OBJECT;
Q_PROPERTY(bool precision READ getPrec WRITE setPrec);

public:
public:
IGLineEdit(const QString& val, InspectorGadget* ig, QWidget* parent);
virtual ~IGLineEdit();

Expand All @@ -59,18 +59,18 @@ class MODELEDITOR_API IGLineEdit : public QLineEdit
QString doubleToQString(double v);
//QString intToQString( int v );

public slots:
public slots:
void togglePrec();

void editDone();

void hardsizeClicked(bool checked);

signals:
signals:

void newValue(const QString& text);

private:
private:
InspectorGadget* m_ig;
bool m_precision;
InspectorGadget::FLOAT_DISPLAY m_floatType;
Expand Down
4 changes: 2 additions & 2 deletions src/model_editor/IGPrecisionDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class MODELEDITOR_API IGPrecisionDialog : public QDialog, public Ui::PrecisionDi
{
Q_OBJECT

public:
public:
IGPrecisionDialog(QWidget* parent = nullptr);

public slots:
public slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
};
Expand Down
10 changes: 5 additions & 5 deletions src/model_editor/IGSpinBoxes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ class MODELEDITOR_API IGSpinBox : public QSpinBox
{
Q_OBJECT;

public:
public:
IGSpinBox(QWidget* parent);

virtual void wheelEvent(QWheelEvent* event) override;

public slots:
public slots:
void triggered(bool); //the radio button got triggered and calls this slot
};

class MODELEDITOR_API IGDSpinBox : public QDoubleSpinBox
{
Q_OBJECT;

public:
public:
IGDSpinBox(InspectorGadget* ig, QWidget* parent);

virtual void wheelEvent(QWheelEvent* event) override;
Expand All @@ -66,11 +66,11 @@ class MODELEDITOR_API IGDSpinBox : public QDoubleSpinBox
void setPrec(bool);
void setFloatStyle(InspectorGadget::FLOAT_DISPLAY style);
InspectorGadget::FLOAT_DISPLAY getFloatStyle() const;
public slots:
public slots:
void triggered(bool); //the radio button got triggered and calls this slot
void togglePrec();

private:
private:
InspectorGadget* m_ig;
bool m_precision;
InspectorGadget::FLOAT_DISPLAY m_floatType;
Expand Down
Loading