Adding upstream version 0.9.0+20151019.

upstream/0.9.0+20151019
Alf Gaida 9 years ago
parent a8fb789d60
commit c3383caa2d

@ -0,0 +1,23 @@
/* This file has been generated by the CMake lxqt_plugin_translation_loader().
* It loads LXQt plugin translations.
*
* Attention: All changes will be overwritten!!!
*/
#include <QCoreApplication>
#include <LXQt/Translator>
/* Dummy helper symbol for referencing.
* In case plugin is linked as static (lib*.a) unreferenced objects are stripped in linking time
* => we need to reference some symbol from this file to be not stripped as a whole.
*/
void * loadPluginTranslation_@catalog_name@_helper = nullptr;
static void loadPluginTranslation()
{
//XXX: we don't use the QStringLiteral here because it causes SEGFAULT in static finalization time
// (the string is stored in static QHash and it's destructor can reference already deleted static QString (generated by QStringLiteral))
LXQt::Translator::translatePlugin("@catalog_name@", "@plugin_type@");
}
Q_COREAPP_STARTUP_FUNCTION(loadPluginTranslation)

@ -59,3 +59,15 @@ function(lxqt_lib_translation_loader source_files catalog_name)
)
set(${source_files} ${${source_files}} ${CMAKE_CURRENT_BINARY_DIR}/LXQtLibTranslationLoader.cpp PARENT_SCOPE)
endfunction()
# lxqt_plugin_translation_loader(<source_files> <catalog_name>)
# <source_files> The generated .cpp file is added to <source_files>
# <catalog_name> Translations catalog to be loaded
# <plugin_type> Plugin type. Example: lxqt-panel
function(lxqt_plugin_translation_loader source_files catalog_name plugin_type)
configure_file(
${LXQT_CMAKE_MODULES_DIR}/LXQtPluginTranslationLoader.cpp.in
LXQtPluginTranslationLoader.cpp @ONLY
)
set(${source_files} ${${source_files}} ${CMAKE_CURRENT_BINARY_DIR}/LXQtPluginTranslationLoader.cpp PARENT_SCOPE)
endfunction()

@ -59,6 +59,12 @@ void ConfigDialog::addPage(QWidget* page, const QString& name, const QString& ic
void ConfigDialog::addPage(QWidget* page, const QString& name, const QStringList& iconNames)
{
Q_ASSERT(page);
if (!page)
{
return;
}
/* We set the layout margin to 0. In the default configuration, one page
* only, it aligns buttons with the page. In multi-page it saves a little
* bit of space, without clutter.

Loading…
Cancel
Save