///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// (at your option) any later version, but always including the *additional*
+// restrictions defined in the "License.txt" file.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#pragma once
#include <QThread>
+#include <QSemaphore>
class DiskObserverThread: public QThread
{
DiskObserverThread(const QString &path);
~DiskObserverThread(void);
- void stop(void) { m_terminated = true; }
+ void stop(void) { m_semaphore.release(); }
protected:
void run(void);
static QString makeRootDir(const QString &baseDir);
signals:
- void messageLogged(const QString &text, bool isWarning);
+ void messageLogged(const QString &text, int type);
void freeSpaceChanged(const quint64);
private:
- volatile bool m_terminated;
+ QSemaphore m_semaphore;
const QString m_path;
};