[kdesrc-build/feature-meson-support] /: meson: Fix build system integration bugs, add docs.

2019-04-30 Thread Michael Pyne
Git commit cd7af4eed524b78a7b5228ce799ae84968acc4b2 by Michael Pyne.
Committed on 01/05/2019 at 02:04.
Pushed by mpyne into branch 'feature-meson-support'.

meson: Fix build system integration bugs, add docs.

This should account for the open issues on !8 and also documents the
ninja-options that is introduced to address @ouwerkerk's recommendation.

Test suite passes and I continue to be able to build 2048.cpp. I've also
validated that ninja-options is passed to ninja when building 2048.cpp,
though this was a manual verification.

M  +43   -2doc/index.docbook
M  +1-0modules/ksb/Application.pm
M  +2-1modules/ksb/BuildSystem.pm
M  +10   -1modules/ksb/BuildSystem/Meson.pm
M  +3-2vim/syntax/kdesrc-buildrc.vim

https://invent.kde.org/kde/kdesrc-build/commit/cd7af4eed524b78a7b5228ce799ae84968acc4b2

diff --git a/doc/index.docbook b/doc/index.docbook
index 881d861..c280ad5 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -2438,10 +2438,15 @@ please be careful while dealing with root 
privileges.
 
 make-options
 Module setting overrides global (build system option)
-Set this variable in order to pass command line options to the
+Set this variable in order to pass command line options to the
 make command. This is useful for programs such as https://github.com/distcc/distcc;>distcc
 or
-systems with more than one processor core.
+systems with more than one processor core.
+Note that not all supported build systems use make. 
For
+build systems that use ninja for build (such as the
+Meson
+build system), see the ninja-options
+setting.
 
 
 
@@ -2499,6 +2504,36 @@ number, the "nicer" the program is. The default is 10.
 
 
 
+
+ninja-options
+Module setting overrides global (build system option)
+Set this variable in order to pass command line options to the
+
+ninja build command. This can be useful to enable 
verbose output
+or to manually reduce the number of parallel build jobs that 
ninja would
+use.
+
+Note that this setting only controls ninja when used by 
.
+The  webengine module uses ninja 
indirectly, but
+only officially supports being built by make.
+In this situation, you can set NINJAFLAGS as a way to have
+make pass the appropriate flags when it later calls
+ninja, by using
+make-options.
+
+
+
+options qtwebengine
+# Restrict make and ninja to using no more than 6 separate compile jobs 
even
+# when more CPU is available, to avoid running out of memory
+make-options 
-j6 NINJAFLAGS=-j6
+end options
+
+
+
+
+
+
 
 no-svn
 Module setting overrides global
@@ -2554,6 +2589,12 @@ the auto-detection. In this case you can manually 
specify the correct build type
 This is the standard configuration tool used for most 
Free and
 open-source software not in any of the other 
categories.
 
+
+meson
+This is a https://mesonbuild.com;>relatively new
+tool gaining popularity as a replacement for the autotools 
and may
+be required for some non- modules.
+
 
 
 
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index 1ae55df..1a3d579 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -2531,6 +2531,7 @@ sub _checkForEssentialBuildPrograms
 my %requiredPackages = (
 qmake => 'Qt',
 cmake => 'CMake',
+meson => 'Meson',
 );
 
 my $preferredPath = absPathToExecutable($prog, @preferred_paths);
diff --git a/modules/ksb/BuildSystem.pm b/modules/ksb/BuildSystem.pm
index 2053f3b..d67a79e 100644
--- a/modules/ksb/BuildSystem.pm
+++ b/modules/ksb/BuildSystem.pm
@@ -134,12 +134,13 @@ sub buildCommands
 sub buildInternal
 {
 my $self = shift;
+my $optionsName = shift // 'make-options';
 
 return $self->safe_make({
 target => undef,
 message => 'Compiling...',
 'make-options' => [
-split(' ', $self->module()->getOption('make-options')),
+split(' ', $self->module()->getOption($optionsName)),
 ],
 logbase => 'build',
 subdirs => [
diff --git a/modules/ksb/BuildSystem/Meson.pm b/modules/ksb/BuildSystem/Meson.pm
index e80d494..3a93a25 100644
--- a/modules/ksb/BuildSystem/Meson.pm
+++ b/modules/ksb/BuildSystem/Meson.pm
@@ -18,6 +18,7 @@ sub name
 return 'meson';
 }
 
+# Override
 # Return value style: boolean
 sub configureInternal
 {
@@ -41,6 +42,14 @@ sub configureInternal
 ]) == 0;
 }
 
+# Override
+sub buildInternal
+{
+my $self = shift;
+
+return $self->SUPER::buildInternal('ninja-options');
+}
+
 # Override
 sub buildCommands
 {
@@ -50,7 +59,7 @@ sub buildCommands
 # Override
 sub requiredPrograms
 {
-return 'meson';
+return ('meson', 'ninja');
 }
 
 # Override
diff --git a/vim/syntax/kdesrc-buildrc.vim b/vim/syntax/kdesrc-buildrc.vim
index 6cd4808..b55fdcc 100644
--- a/vim/syntax/kdesrc-buildrc.vim
+++ b/vim/syntax/kdesrc-buildrc.vim
@@ -1,9 +1,9 @@
 " Vim syntax file
 " Language: 

D20912: On Windows do not install static kdeinit library intended for internal usage only

2019-04-30 Thread Ralf Habacker
habacker added a comment.


  What is the purpose of kdeinit libraries ? They are intended for faster 
process creating (see https://api.kde.org/frameworks/kinit/html/index.html) and 
therefore kdeinit libraries need to be installed on platforms supporting 
fork-and-exec to be reqachable by kdeinit. Because Windows have no such support 
this libraries are obsolete and are only used internal to be linked into the 
final application like khelpcenter.

REPOSITORY
  R125 KHelpCenter

REVISION DETAIL
  https://phabricator.kde.org/D20912

To: habacker
Cc: ltoscano, vonreth, kde-doc-english, gennad, skadinna


[plasma-nm/Plasma/5.15] kded: Reject invalid keys

2019-04-30 Thread Oleg Solovyov
Git commit 257b03b185d30312a8c3308092f77ca7a6b9c84d by Oleg Solovyov.
Committed on 30/04/2019 at 13:21.
Pushed by osolovyov into branch 'Plasma/5.15'.

Reject invalid keys

Summary:
PasswordDialog accepted invalid keys, which causes storing them in user's
wallet. In that case, no new secrets will be requested from user:
plasma-nm will silently fail to connect unless key is edited or deleted.

GUI: OK button is disabled when key is invalid

Reviewers: jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D20900

M  +24   -0kded/passworddialog.cpp

https://commits.kde.org/plasma-nm/257b03b185d30312a8c3308092f77ca7a6b9c84d

diff --git a/kded/passworddialog.cpp b/kded/passworddialog.cpp
index 410d7085..59992ebc 100644
--- a/kded/passworddialog.cpp
+++ b/kded/passworddialog.cpp
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -69,6 +70,29 @@ void PasswordDialog::initializeUi()
 
 connect(m_ui->buttonBox, ::accepted, this, 
::accept);
 connect(m_ui->buttonBox, ::rejected, this, 
::reject);
+connect(m_ui->password, ::textChanged, [this](const QString 
){
+if (m_connectionSettings->connectionType() == 
NetworkManager::ConnectionSettings::Wireless) {
+NetworkManager::WirelessSecuritySetting::Ptr 
wirelessSecuritySetting =
+
m_connectionSettings->setting(NetworkManager::Setting::WirelessSecurity).staticCast();
+bool valid = true;
+
+if (wirelessSecuritySetting) {
+switch (wirelessSecuritySetting->keyMgmt()) {
+case NetworkManager::WirelessSecuritySetting::WpaPsk:
+valid = wpaPskIsValid(text);
+break;
+case NetworkManager::WirelessSecuritySetting::Wep:
+valid = wepKeyIsValid(text, 
wirelessSecuritySetting->wepKeyType());
+break;
+default:
+break;
+}
+}
+
+// disable button if key is not valid
+m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDisabled(!valid);
+}
+});
 
 if (m_connectionSettings->connectionType() != 
NetworkManager::ConnectionSettings::Vpn) {
 NetworkManager::Setting::Ptr setting = 
m_connectionSettings->setting(m_settingName);


D20912: On Windows do not install static kdeinit library intended for internal usage only

2019-04-30 Thread Hannah von Reth
vonreth added a comment.


  I think it depends on whether any external project tries to link to it, and I 
have no idea whether thats the case.

REPOSITORY
  R125 KHelpCenter

REVISION DETAIL
  https://phabricator.kde.org/D20912

To: habacker
Cc: ltoscano, vonreth, kde-doc-english, gennad, skadinna


D20912: On Windows do not install static kdeinit library intended for internal usage only

2019-04-30 Thread Luigi Toscano
ltoscano added subscribers: vonreth, ltoscano.
ltoscano added a comment.


  @vonreth #windows  do you have any 
comment about this? The way I read the comment in the 
KF5_ADD_KDEINIT_EXECUTABLE macro does not imply that the library should not be 
installed. If it should not be installe,d I guess that similar changes should 
be applied to other applications (I found at least dolphin and kcalc).

REPOSITORY
  R125 KHelpCenter

REVISION DETAIL
  https://phabricator.kde.org/D20912

To: habacker
Cc: ltoscano, vonreth, kde-doc-english, gennad, skadinna