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

Use #pragma once everywhere #50

Merged
merged 1 commit into from
Nov 13, 2016
Merged
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
11 changes: 4 additions & 7 deletions connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_CONNECTION_H
#define QMATRIXCLIENT_CONNECTION_H
#pragma once

#include <QtCore/QObject>
#include <QtCore/QUrl>
Expand Down Expand Up @@ -83,13 +82,13 @@ namespace QMatrixClient
void connectionError(QString error);
void resolveError(QString error);
//void jobError(BaseJob* job);

protected:
/**
* @brief Access the underlying ConnectionData class
*/
ConnectionData* connectionData();

/**
* @brief Find a (possibly new) Room object for the specified id
* Use this method whenever you need to find a Room object in
Expand All @@ -105,7 +104,7 @@ namespace QMatrixClient
* makes it possible for derived classes to have its own User class
*/
virtual User* createUser(QString userId);

/**
* makes it possible for derived classes to have its own Room class
*/
Expand All @@ -116,5 +115,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_CONNECTION_H
11 changes: 4 additions & 7 deletions connectiondata.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_CONNECTIONDATA_H
#define QMATRIXCLIENT_CONNECTIONDATA_H
#pragma once

#include <QtCore/QUrl>

Expand All @@ -30,7 +29,7 @@ namespace QMatrixClient
public:
ConnectionData(QUrl baseUrl);
virtual ~ConnectionData();

//bool isConnected() const;
QString accessToken() const;
QUrl baseUrl() const;
Expand All @@ -42,11 +41,9 @@ namespace QMatrixClient

QString lastEvent() const;
void setLastEvent( QString identifier );

private:
class Private;
Private* d;
};
}

#endif // QMATRIXCLIENT_CONNECTIONDATA_H
}
5 changes: 1 addition & 4 deletions events/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_EVENT_H
#define QMATRIXCLIENT_EVENT_H
#pragma once

#include <algorithm>

Expand Down Expand Up @@ -112,5 +111,3 @@ namespace QMatrixClient
return fallback;
}
}

#endif // QMATRIXCLIENT_EVENT_H
5 changes: 1 addition & 4 deletions events/receiptevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_RECEIPTEVENT_H
#define QMATRIXCLIENT_RECEIPTEVENT_H
#pragma once

#include "event.h"

Expand Down Expand Up @@ -56,5 +55,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_RECEIPTEVENT_H
5 changes: 1 addition & 4 deletions events/roomaliasesevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMALIASESEVENT_H
#define QMATRIXCLIENT_ROOMALIASESEVENT_H
#pragma once

#include "event.h"

Expand All @@ -40,5 +39,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_ROOMALIASESEVENT_H
5 changes: 1 addition & 4 deletions events/roomcanonicalaliasevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMCANONICALALIASEVENT_H
#define QMATRIXCLIENT_ROOMCANONICALALIASEVENT_H
#pragma once

#include "event.h"

Expand All @@ -38,5 +37,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_ROOMCANONICALALIASEVENT_H
5 changes: 1 addition & 4 deletions events/roommemberevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMMEMBEREVENT_H
#define QMATRIXCLIENT_ROOMMEMBEREVENT_H
#pragma once

#include <QtCore/QJsonObject>
#include <QtCore/QUrl>
Expand Down Expand Up @@ -46,5 +45,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_ROOMMEMBEREVENT_H
11 changes: 4 additions & 7 deletions events/roommessageevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMMESSAGEEVENT_H
#define QMATRIXCLIENT_ROOMMESSAGEEVENT_H
#pragma once

#include <QtCore/QUrl>
#include <QtCore/QMimeType>
Expand All @@ -42,7 +41,7 @@ namespace QMatrixClient
public:
RoomMessageEvent();
virtual ~RoomMessageEvent();

QString userId() const;
MessageEventType msgtype() const;

Expand All @@ -57,9 +56,9 @@ namespace QMatrixClient
QString body() const;

MessageEventContent::Base* content() const;

static RoomMessageEvent* fromJson( const QJsonObject& obj );

private:
class Private;
Private* d;
Expand Down Expand Up @@ -145,5 +144,3 @@ namespace QMatrixClient
using AudioContent = ThumbnailedContent<AudioInfo>;
}
}

#endif // QMATRIXCLIENT_ROOMMESSAGEEVENT_H
5 changes: 1 addition & 4 deletions events/roomnameevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMNAMEEVENT_H
#define QMATRIXCLIENT_ROOMNAMEEVENT_H
#pragma once

#include "event.h"

Expand All @@ -40,5 +39,3 @@ class RoomNameEvent : public Event
};

}

#endif // QMATRIXCLIENT_ROOMNAMEEVENT_H
5 changes: 1 addition & 4 deletions events/roomtopicevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_ROOMTOPICEVENT_H
#define QMATRIXCLIENT_ROOMTOPICEVENT_H
#pragma once

#include <QtCore/QJsonObject>

Expand All @@ -40,5 +39,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_ROOMTOPICEVENT_H
5 changes: 1 addition & 4 deletions events/typingevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_TYPINGEVENT_H
#define QMATRIXCLIENT_TYPINGEVENT_H
#pragma once

#include <QtCore/QStringList>

Expand All @@ -40,5 +39,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_TYPINGEVENT_H
5 changes: 1 addition & 4 deletions events/unknownevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_UNKNOWNEVENT_H
#define QMATRIXCLIENT_UNKNOWNEVENT_H
#pragma once

#include "event.h"

Expand All @@ -39,5 +38,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_UNKNOWNEVENT_H
5 changes: 1 addition & 4 deletions jobs/basejob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_BASEJOB_H
#define QMATRIXCLIENT_BASEJOB_H
#pragma once

#include <QtCore/QObject>
#include <QtCore/QJsonDocument>
Expand Down Expand Up @@ -229,5 +228,3 @@ namespace QMatrixClient
QScopedPointer<Private> d;
};
}

#endif // QMATRIXCLIENT_BASEJOB_H
13 changes: 5 additions & 8 deletions jobs/checkauthmethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,27 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_CHECKAUTHMETHODS_H
#define QMATRIXCLIENT_CHECKAUTHMETHODS_H
#pragma once

#include "basejob.h"

namespace QMatrixClient
{
class ConnectionData;

class CheckAuthMethods : public BaseJob
{
public:
CheckAuthMethods(ConnectionData* connection);
virtual ~CheckAuthMethods();

QString session();

protected:
Status parseJson(const QJsonDocument& data) override;

private:
class Private;
Private* d;
};
}

#endif // QMATRIXCLIENT_CHECKAUTHMETHODS_H
5 changes: 1 addition & 4 deletions jobs/geteventsjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_GETEVENTSJOB_H
#define QMATRIXCLIENT_GETEVENTSJOB_H
#pragma once

#include "basejob.h"

Expand Down Expand Up @@ -45,5 +44,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_GETEVENTSJOB_H
5 changes: 1 addition & 4 deletions jobs/joinroomjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_JOINROOMJOB_H
#define QMATRIXCLIENT_JOINROOMJOB_H
#pragma once

#include "basejob.h"

Expand All @@ -41,5 +40,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_JOINROOMJOB_H
5 changes: 1 addition & 4 deletions jobs/leaveroomjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_LEAVEROOMJOB_H
#define QMATRIXCLIENT_LEAVEROOMJOB_H
#pragma once

#include "basejob.h"

Expand All @@ -33,5 +32,3 @@ namespace QMatrixClient
virtual ~LeaveRoomJob();
};
}

#endif // QMATRIXCLIENT_LEAVEROOMJOB_H
5 changes: 1 addition & 4 deletions jobs/mediathumbnailjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_MEDIATHUMBNAILJOB_H
#define QMATRIXCLIENT_MEDIATHUMBNAILJOB_H
#pragma once

#include "basejob.h"

Expand All @@ -44,5 +43,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_MEDIATHUMBNAILJOB_H
5 changes: 1 addition & 4 deletions jobs/passwordlogin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef QMATRIXCLIENT_PASSWORDLOGIN_H
#define QMATRIXCLIENT_PASSWORDLOGIN_H
#pragma once

#include "basejob.h"

Expand All @@ -43,5 +42,3 @@ namespace QMatrixClient
Private* d;
};
}

#endif // QMATRIXCLIENT_PASSWORDLOGIN_H
Loading