Browse Source

[COR] Quelques petites corrections

master
Ulrich Van Den Hekke 12 years ago
parent
commit
33e9683f55
  1. 12
      framework/core/xinxsingleton.h
  2. 2
      plugins/cvsplugin/rcs_cvs.cpp
  3. 3
      plugins/cvsplugin/rcs_cvs.h

12
framework/core/xinxsingleton.h

@ -25,6 +25,10 @@
#include <QMutexLocker>
#include <QDebug>
// Std header
#include <iostream>
#include <typeinfo>
// Xinx header
#include "xinxcore.h"
@ -40,11 +44,15 @@ public:
{
if (_self == NULL)
{
std::cerr << "Lock singleton of type " << typeid(T).name() << std::endl;
QMutexLocker locker(&_self_mutex);
if (_self == NULL)
{
std::cerr << "Pre-create singleton of type " << typeid(T).name() << std::endl;
_self = new T;
std::cerr << "Post-create singleton of type " << typeid(T).name() << std::endl;
_self->initialisation();
std::cerr << "Post-init singleton of type " << typeid(T).name() << std::endl;
}
}
@ -86,11 +94,15 @@ public:
{
if (_self == NULL)
{
std::cerr << "Lock singleton of type " << typeid(T).name() << std::endl;
QMutexLocker locker(&_self_mutex);
if (_self == NULL)
{
std::cerr << "Pre-create singleton of type " << typeid(T).name() << std::endl;
_self = new T;
std::cerr << "Post-create singleton of type " << typeid(T).name() << std::endl;
_self->initialisation();
std::cerr << "Post-init singleton of type " << typeid(T).name() << std::endl;
}
}

2
plugins/cvsplugin/rcs_cvs.cpp

@ -352,6 +352,8 @@ void RCS_CVS::entriesStateChanged(const QString & path)
void RCS_CVS::updateEntries()
{
QMutexLocker locker(&_mutex);
if (m_watcher->files().size())
m_watcher->removePaths(m_watcher->files());

3
plugins/cvsplugin/rcs_cvs.h

@ -30,6 +30,7 @@
// Qt header
#include <QPointer>
#include <QProcess>
#include <QMutex>
class PluginSettings;
@ -78,6 +79,8 @@ private:
EntriesList * m_entriesList;
FilesWatcher * m_watcher;
QMutex _mutex;
QString m_cvs;
PluginSettings * m_settings;
};

Loading…
Cancel
Save