Implemented application login.
Minor UI improvement. Fixed memory leaks.
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
#include <QSqlDatabase>
|
||||
#include <QStringList>
|
||||
#include <QSettings>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "define.h"
|
||||
#include "core_global.h"
|
||||
#include "transaction.h"
|
||||
#include "data/core-data.h"
|
||||
|
||||
#include <odb/database.hxx>
|
||||
#include <odb/session.hxx>
|
||||
@@ -20,6 +22,7 @@ class IPlugin;
|
||||
class CORESHARED_EXPORT Context
|
||||
{
|
||||
public:
|
||||
~Context();
|
||||
static Context &instance();
|
||||
QList<IPlugin*> plugins();
|
||||
IPlugin *plugin(const QString &pluginId);
|
||||
@@ -31,6 +34,9 @@ public:
|
||||
void destroy();
|
||||
QStringList defaultPerms();
|
||||
|
||||
QSharedPointer<User> currentUser() const;
|
||||
void setCurrentUser(const QSharedPointer<User> ¤tUser);
|
||||
|
||||
private:
|
||||
Context();
|
||||
QList<IPlugin*> m_plugins;
|
||||
@@ -38,6 +44,7 @@ private:
|
||||
QSettings *m_settings;
|
||||
bool m_dbOpened;
|
||||
odb::session m_session;
|
||||
QSharedPointer<User> m_currentUser;
|
||||
|
||||
QStringList m_solved;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user