Commit ac72bd81 authored by Alf Gaida's avatar Alf Gaida

Cherry-picking upstream version 0.9.0+20150901.

parent 8add749e
*.kdev4*
moc_*.cxx
qrc_*.cxx
cmake_install.cmake
cmake_uninstall.cmake
Makefile
CMakeFiles
CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake
lib*.so
lib*.so.*
ui_*.h
*.qm
lxqt-appswitcher/lxqt-appswitcher
lxqt-desktop/lxqt-desktop
lxqt-panel/panel/lxqt-panel
*~
*.autosave
*-swp
CMakeLists.txt.user*
/build
nbproject/
......@@ -145,7 +145,7 @@ QT5_ADD_DBUS_INTERFACE(SRCS
QT5_ADD_DBUS_ADAPTOR(SRCS
dbus/org.lxqt.SingleApplication.xml
lxqtsingleapplication.h LxQt::SingleApplication
lxqtsingleapplication.h LXQt::SingleApplication
)
set(LXQT_QT_VERSION "5")
......
......@@ -9,7 +9,7 @@
static void loadAppTranslation()
{
LxQt::Translator::translateApplication(QStringLiteral("@catalog_name@"));
LXQt::Translator::translateApplication(QStringLiteral("@catalog_name@"));
}
Q_COREAPP_STARTUP_FUNCTION(loadAppTranslation)
......@@ -9,7 +9,7 @@
static void loadLibTranslation()
{
LxQt::Translator::translateLibrary(QStringLiteral("@catalog_name@"));
LXQt::Translator::translateLibrary(QStringLiteral("@catalog_name@"));
}
Q_COREAPP_STARTUP_FUNCTION(loadLibTranslation)
#=============================================================================
# The lxqt_translate_desktop() function was copied from the
# LXQt LxQtTranslate.cmake
# LXQt LXQtTranslate.cmake
#
# Original Author: Alexander Sokolov <sokoloff.a@gmail.com>
#
......
......@@ -28,7 +28,7 @@
#include <XdgIcon>
#include <QPushButton>
using namespace LxQt;
using namespace LXQt;
ConfigDialog::ConfigDialog(const QString& title, Settings* settings, QWidget* parent) :
QDialog(parent),
......
......@@ -35,7 +35,7 @@ namespace Ui {
class ConfigDialog;
}
namespace LxQt
namespace LXQt
{
class LXQT_API ConfigDialog : public QDialog
......@@ -103,5 +103,5 @@ private slots:
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTCONFIGDIALOG_H
......@@ -17,7 +17,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="LxQt::PageSelectWidget" name="moduleList">
<widget class="LXQt::PageSelectWidget" name="moduleList">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
......@@ -50,7 +50,7 @@
</widget>
<customwidgets>
<customwidget>
<class>LxQt::PageSelectWidget</class>
<class>LXQt::PageSelectWidget</class>
<extends>QListWidget</extends>
<header location="global">configdialog/lxqtpageselectwidget.h</header>
</customwidget>
......
......@@ -31,7 +31,7 @@
#include <QStyledItemDelegate>
#include <QScrollBar>
using namespace LxQt;
using namespace LXQt;
class PageSelectWidgetItemDelegate: public QStyledItemDelegate
{
......
......@@ -32,7 +32,7 @@
#include "lxqtglobals.h"
#include <QListWidget>
namespace LxQt
namespace LXQt
{
class LXQT_API PageSelectWidget : public QListWidget
......@@ -46,5 +46,5 @@ protected:
QSize sizeHint() const;
};
} // namespace LxQt
} // namespace LXQt
#endif // PAGESELECTWIDGET_H
......@@ -33,7 +33,7 @@
#include <XdgIcon>
#include <XdgDirs>
using namespace LxQt;
using namespace LXQt;
#define COLOR_DEBUG "\033[32;2m"
#define COLOR_WARN "\033[33;2m"
......
......@@ -32,7 +32,7 @@
#include <QProxyStyle>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
/*! \brief LXQt wrapper around QApplication.
......@@ -79,7 +79,7 @@ signals:
#if defined(lxqtApp)
#undef lxqtApp
#endif
#define lxqtApp (static_cast<LxQt::Application *>(qApp))
#define lxqtApp (static_cast<LXQt::Application *>(qApp))
} // namespace LxQt
} // namespace LXQt
#endif // LXQTAPPLICATION_H
......@@ -28,7 +28,7 @@
#include <XdgAutoStart>
#include <XdgDirs>
using namespace LxQt;
using namespace LXQt;
AutostartEntry::AutostartEntry() :
mLocalState(StateNone), mSystem(false)
......
......@@ -28,7 +28,7 @@
#include "lxqtglobals.h"
#include <XdgDesktopFile>
namespace LxQt
namespace LXQt
{
/*! \brief The AutostartEntry class provides an interface for staging configuration of individual
......@@ -110,5 +110,5 @@ protected:
bool mSystem; //! true if the "system" file exists
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTAUTOSTARTENTRY_H
......@@ -31,9 +31,9 @@
#include <math.h>
#include <QWidget>
using namespace LxQt;
using namespace LXQt;
class LxQt::GridLayoutPrivate
class LXQt::GridLayoutPrivate
{
public:
GridLayoutPrivate();
......
......@@ -34,7 +34,7 @@
#include <QLayout>
namespace LxQt
namespace LXQt
{
class GridLayoutPrivate;
......@@ -233,5 +233,5 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(GridLayout::Stretch)
} // namespace LxQt
} // namespace LXQt
#endif // LXQTGRIDLAYOUT_H
......@@ -30,7 +30,7 @@
#include <QAbstractTextDocumentLayout>
#include <QTextDocument>
using namespace LxQt;
using namespace LXQt;
HtmlDelegate::HtmlDelegate(const QSize iconSize, QObject* parent) :
......
......@@ -33,7 +33,7 @@
#include <QPainter>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
class LXQT_API HtmlDelegate : public QStyledItemDelegate
......
......@@ -27,7 +27,7 @@
#include <QMessageBox>
#include <QDebug>
using namespace LxQt;
using namespace LXQt;
Notification::Notification(const QString& summary, QObject* parent) :
QObject(parent),
......
......@@ -29,7 +29,7 @@
#include <QStringList>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
class NotificationPrivate;
......@@ -175,7 +175,7 @@ signals:
* \brief Emitted when the notification is closed
* \param reason How notification was closed
*/
void notificationClosed(LxQt::Notification::CloseReason reason);
void notificationClosed(LXQt::Notification::CloseReason reason);
/*!
* \brief Emitted when an action button is activated.
......@@ -189,5 +189,5 @@ private:
NotificationPrivate* const d_ptr;
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTNOTIFICATION_H
......@@ -28,7 +28,7 @@
#include "lxqtnotification.h"
#include "notifications_interface.h"
namespace LxQt
namespace LXQt
{
class NotificationPrivate : public QObject
......@@ -63,5 +63,5 @@ private:
Q_DECLARE_PUBLIC(Notification)
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTNOTIFICATION_P_H
......@@ -35,7 +35,7 @@
#include <QLibrary>
#include <QDebug>
using namespace LxQt;
using namespace LXQt;
/************************************************
......@@ -75,7 +75,7 @@ QLibrary* PluginInfo::loadLibrary(const QString& libDir) const
QString baseName, path;
QFileInfo fi = QFileInfo(fileName());
path = fi.canonicalPath();
baseName = value("X-LxQt-Library", fi.completeBaseName()).toString();
baseName = value("X-LXQt-Library", fi.completeBaseName()).toString();
QString soPath = QDir(libDir).filePath(QString("lib%2.so").arg(baseName));
QLibrary* library = new QLibrary(soPath);
......@@ -139,7 +139,7 @@ PluginInfoList PluginInfo::search(const QString& desktopFilesDir, const QString&
/************************************************
************************************************/
QDebug operator<<(QDebug dbg, const LxQt::PluginInfo &pluginInfo)
QDebug operator<<(QDebug dbg, const LXQt::PluginInfo &pluginInfo)
{
dbg.nospace() << QString("%1").arg(pluginInfo.id());
return dbg.space();
......@@ -149,7 +149,7 @@ QDebug operator<<(QDebug dbg, const LxQt::PluginInfo &pluginInfo)
/************************************************
************************************************/
QDebug operator<<(QDebug dbg, const LxQt::PluginInfo * const pluginInfo)
QDebug operator<<(QDebug dbg, const LXQt::PluginInfo * const pluginInfo)
{
return operator<<(dbg, *pluginInfo);
}
......
......@@ -41,7 +41,7 @@
class QLibrary;
namespace LxQt
namespace LXQt
{
/*!
......@@ -52,7 +52,7 @@ lxqtpanel_clock2.desktop file
[Desktop Entry]
Type=Service
ServiceTypes=LxQtPanel/Plugin
ServiceTypes=LXQtPanel/Plugin
Name=Clock
Comment=Clock and calendar
......@@ -89,7 +89,7 @@ public:
/*! Returns a list of PluginInfo objects for the matched files in the directories.
@param desktopFilesDirs - scanned directories names.
@param serviceType - type of the plugin, for example "LxQtPanel/Plugin".
@param serviceType - type of the plugin, for example "LXQtPanel/Plugin".
@param nameFilter - wildcard filter that understands * and ? wildcards.
If the same filename is located under multiple directories only the first file should be used.
......@@ -105,12 +105,12 @@ private:
typedef QList<PluginInfo> PluginInfoList;
} // namespace LxQt
} // namespace LXQt
QDebug operator<<(QDebug dbg, const LxQt::PluginInfo& pi);
QDebug operator<<(QDebug dbg, const LxQt::PluginInfo* const pi);
QDebug operator<<(QDebug dbg, const LXQt::PluginInfo& pi);
QDebug operator<<(QDebug dbg, const LXQt::PluginInfo* const pi);
QDebug operator<<(QDebug dbg, const LxQt::PluginInfoList& list);
QDebug operator<<(QDebug dbg, const LxQt::PluginInfoList* const pluginInfoList);
QDebug operator<<(QDebug dbg, const LXQt::PluginInfoList& list);
QDebug operator<<(QDebug dbg, const LXQt::PluginInfoList* const pluginInfoList);
#endif // LXQTPLUGININFO_H
......@@ -31,7 +31,7 @@
#include <QtAlgorithms>
#include <QDebug>
using namespace LxQt;
using namespace LXQt;
Power::Power(QObject *parent) :
QObject(parent)
......@@ -41,7 +41,7 @@ Power::Power(QObject *parent) :
mProviders.append(new UPowerProvider(this));
mProviders.append(new ConsoleKitProvider(this));
mProviders.append(new LxSessionProvider(this));
mProviders.append(new LxQtProvider(this));
mProviders.append(new LXQtProvider(this));
}
......
......@@ -33,7 +33,7 @@
#include <QList>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
......@@ -103,5 +103,5 @@ private:
QList<PowerProvider*> mProviders;
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTPOWER_H
......@@ -47,7 +47,7 @@
#define SYSTEMD_INTERFACE "org.freedesktop.login1.Manager"
#define LXQT_SERVICE "org.lxqt.session"
#define LXQT_PATH "/LxQtSession"
#define LXQT_PATH "/LXQtSession"
#define LXQT_INTERFACE "org.lxqt.session"
#define LXSESSION_SERVICE "org.lxde.SessionManager"
......@@ -56,7 +56,7 @@
#define PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
using namespace LxQt;
using namespace LXQt;
/************************************************
Helper func
......@@ -183,7 +183,7 @@ bool dbusGetProperty(const QString &service,
if (!dbus.isValid())
{
qWarning() << "dbusGetProperty: QDBusInterface is invalid" << service << path << interface << property;
// Notification::notify(QObject::tr("LxQt Power Manager"),
// Notification::notify(QObject::tr("LXQt Power Manager"),
// "lxqt-logo.png",
// QObject::tr("Power Manager Error"),
// QObject::tr("QDBusInterface is invalid")+ "\n\n" + service +" " + path +" " + interface +" " + property);
......@@ -196,7 +196,7 @@ bool dbusGetProperty(const QString &service,
if (!msg.errorName().isEmpty())
{
printDBusMsg(msg);
// Notification::notify(QObject::tr("LxQt Power Manager"),
// Notification::notify(QObject::tr("LXQt Power Manager"),
// "lxqt-logo.png",
// QObject::tr("Power Manager Error (Get Property)"),
// msg.errorName() + "\n\n" + msg.errorMessage());
......@@ -473,20 +473,20 @@ bool SystemdProvider::doAction(Power::Action action)
/************************************************
LxQtProvider
LXQtProvider
************************************************/
LxQtProvider::LxQtProvider(QObject *parent):
LXQtProvider::LXQtProvider(QObject *parent):
PowerProvider(parent)
{
}
LxQtProvider::~LxQtProvider()
LXQtProvider::~LXQtProvider()
{
}
bool LxQtProvider::canAction(Power::Action action) const
bool LXQtProvider::canAction(Power::Action action) const
{
switch (action)
{
......@@ -501,7 +501,7 @@ bool LxQtProvider::canAction(Power::Action action) const
}
bool LxQtProvider::doAction(Power::Action action)
bool LXQtProvider::doAction(Power::Action action)
{
QString command;
......
......@@ -34,7 +34,7 @@
#include "lxqtpower.h"
#include <QProcess> // for PID_T
namespace LxQt
namespace LXQt
{
......@@ -101,12 +101,12 @@ public slots:
};
class LxQtProvider: public PowerProvider
class LXQtProvider: public PowerProvider
{
Q_OBJECT
public:
LxQtProvider(QObject *parent = 0);
~LxQtProvider();
LXQtProvider(QObject *parent = 0);
~LXQtProvider();
bool canAction(Power::Action action) const;
public slots:
......@@ -155,5 +155,5 @@ private:
Settings mSettings;
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTPOWER_PROVIDERS_H
......@@ -37,7 +37,7 @@
#include "lxqtsettings.h"
#include <XdgIcon>
namespace LxQt {
namespace LXQt {
class LXQT_API MessageBox: public QMessageBox
{
......@@ -67,7 +67,7 @@ public:
static void warning(const QString& title, const QString& text)
{
QMessageBox::warning(parentWidget(), tr("LxQt Power Manager Error"), tr("Hibernate failed."));
QMessageBox::warning(parentWidget(), tr("LXQt Power Manager Error"), tr("Hibernate failed."));
}
......@@ -149,7 +149,7 @@ QList<QAction*> PowerManager::availableActions()
void PowerManager::suspend()
{
if (m_skipWarning ||
MessageBox::question(tr("LxQt Session Suspend"),
MessageBox::question(tr("LXQt Session Suspend"),
tr("Do you want to really suspend your computer?<p>Suspends the computer into a low power state. System state is not preserved if the power is lost.")))
{
m_power->suspend();
......@@ -159,7 +159,7 @@ void PowerManager::suspend()
void PowerManager::hibernate()
{
if (m_skipWarning ||
MessageBox::question(tr("LxQt Session Hibernate"),
MessageBox::question(tr("LXQt Session Hibernate"),
tr("Do you want to really hibernate your computer?<p>Hibernates the computer into a low power state. System state is preserved if the power is lost.")))
{
m_power->hibernate();
......@@ -169,7 +169,7 @@ void PowerManager::hibernate()
void PowerManager::reboot()
{
if (m_skipWarning ||
MessageBox::question(tr("LxQt Session Reboot"),
MessageBox::question(tr("LXQt Session Reboot"),
tr("Do you want to really restart your computer? All unsaved work will be lost...")))
{
m_power->reboot();
......@@ -179,7 +179,7 @@ void PowerManager::reboot()
void PowerManager::shutdown()
{
if (m_skipWarning ||
MessageBox::question(tr("LxQt Session Shutdown"),
MessageBox::question(tr("LXQt Session Shutdown"),
tr("Do you want to really switch off your computer? All unsaved work will be lost...")))
{
m_power->shutdown();
......@@ -189,7 +189,7 @@ void PowerManager::shutdown()
void PowerManager::logout()
{
if (m_skipWarning ||
MessageBox::question(tr("LxQt Session Logout"),
MessageBox::question(tr("LXQt Session Logout"),
tr("Do you want to really logout? All unsaved work will be lost...")))
{
m_power->logout();
......@@ -198,12 +198,12 @@ void PowerManager::logout()
void PowerManager::hibernateFailed()
{
MessageBox::warning(tr("LxQt Power Manager Error"), tr("Hibernate failed."));
MessageBox::warning(tr("LXQt Power Manager Error"), tr("Hibernate failed."));
}
void PowerManager::suspendFailed()
{
MessageBox::warning(tr("LxQt Power Manager Error"), tr("Suspend failed."));
MessageBox::warning(tr("LXQt Power Manager Error"), tr("Suspend failed."));
}
} // namespace LxQt
} // namespace LXQt
......@@ -32,7 +32,7 @@
#include <QAction>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
class Power;
......@@ -60,7 +60,7 @@ public:
bool skipWarning() const { return m_skipWarning; }
private:
LxQt::Power * m_power;
LXQt::Power * m_power;
bool m_skipWarning;
private slots:
......@@ -68,6 +68,6 @@ private slots:
void suspendFailed();
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTPOWERMANAGER_H
......@@ -27,7 +27,7 @@
#include <QDir>
#include <QFileInfo>
using namespace LxQt;
using namespace LXQt;
LXQT_API bool ProgramFinder::programExists(const QString& command)
{
......
......@@ -28,7 +28,7 @@
#include <QStringList>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
namespace ProgramFinder
......@@ -57,5 +57,5 @@ namespace ProgramFinder
LXQT_API QString programName(const QString& command);
}
} // namespace LxQt
} // namespace LXQt
#endif // LXQTPROGRAMFINDER_H
......@@ -41,7 +41,7 @@
#include <QResizeEvent>
using namespace LxQt;
using namespace LXQt;
RotatedWidget::RotatedWidget(QWidget &content, QWidget *parent, Qt::WindowFlags f)
: QWidget(parent, f)
......
......@@ -31,7 +31,7 @@
#include <QWidget>
#include "lxqtglobals.h"
namespace LxQt
namespace LXQt
{
class LXQT_API RotatedWidget: public QWidget
......@@ -122,5 +122,5 @@ private:
bool mTransferLeaveEvent;
};
} // namespace LxQt
} // namespace LXQt
#endif // LXQTROTATEDWIDGET_H
......@@ -33,7 +33,7 @@
#include <QMessageBox>
#include <QAction>
using namespace LxQt;
using namespace LXQt;
ScreenSaver::ScreenSaver(QObject * parent)
: QObject(parent)
......
......@@ -33,7 +33,7 @@
#include <QProcess>
#include <QAction>
namespace LxQt
namespace LXQt
{
class LXQT_API ScreenSaver : public QObject
......@@ -59,6 +59,6 @@ private slots:
};
} // namespace LxQt
} // namespace LXQt
#endif
......@@ -39,9 +39,9 @@
#include <XdgIcon>
#include <XdgDirs>
using namespace LxQt;
using namespace LXQt;
class LxQt::SettingsPrivate
class LXQt::SettingsPrivate
{
public:
SettingsPrivate(Settings* parent):
......@@ -60,11 +60,11 @@ private:
};
LxQtTheme* LxQtTheme::mInstance = 0;
LXQtTheme* LXQtTheme::mInstance = 0;
class LxQt::LxQtThemeData: public QSharedData {
class LXQt::LXQtThemeData: public QSharedData {
public:
LxQtThemeData(): mValid(false) {}
LXQtThemeData(): mValid(false) {}
QString loadQss(const QString& qssFile) const;
QString findTheme(const QString &themeName);
......@@ -76,7 +76,7 @@ public:
};
class LxQt::GlobalSettingsPrivate
class LXQt::GlobalSettingsPrivate
{
public:
GlobalSettingsPrivate(GlobalSettings *parent):
......@@ -88,7 +88,7 @@ public:
GlobalSettings *mParent;
QString mIconTheme;
QString mLxQtTheme;
QString mLXQtTheme;
qlonglong mThemeUpdated;
};
......@@ -337,8 +337,8 @@ void Settings::setLocalizedValue(const QString &key, const QVariant &value)
/************************************************
************************************************/
LxQtTheme::LxQtTheme():
d(new LxQtThemeData)
LXQtTheme::LXQtTheme():
d(new LXQtThemeData)
{
}
......@@ -346,8 +346,8 @@ LxQtTheme::LxQtTheme():
/************************************************
************************************************/
LxQtTheme::LxQtTheme(const QString &path):
d(new LxQtThemeData)
LXQtTheme::LXQtTheme(const QString &path):
d(new LXQtThemeData)
{
if (path.isEmpty())
return;
......@@ -374,7 +374,7 @@ LxQtTheme::LxQtTheme(const QString &path):