D5574: Don't set ItemHasContents in DropArea

2017-04-24 Thread David Edmundson
davidedmundson created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  ItemHasContents means we get included in generating the QSG node
  treeview when we render.
  
  This item doesn't have any contents. It's like a MouseArea.
  
  ::setEnabled() doesn't need updating as it was already missing.

REPOSITORY
  R296 KDeclarative

BRANCH
  master

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

AFFECTED FILES
  src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, #frameworks, spstarr, progwolff, Zren, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol


D5573: Don't accept hover events in the DragArea

2017-04-24 Thread David Edmundson
davidedmundson created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  We don't actually process hoverEnter/move events, so there's no need to
  have the overhead of having them sent to use.
  
  We still get dragMove events regardless.
  
  Setting it enabled broke FolderView nested in a grouping Plasmoid and
  doesn't do anything useful.

TEST PLAN
  Tested folderview in a grouping plasmoid
  Also tested dragging an item from dolphin over an existing folderview. 
  Dragging over folders still worked as before

REPOSITORY
  R296 KDeclarative

BRANCH
  master

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

AFFECTED FILES
  src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, #frameworks, spstarr, progwolff, Zren, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol


D5556: build: Remove KService dependency

2017-04-24 Thread Palo Kisa
palokisa added a comment.


  In https://phabricator.kde.org/D5556#104466, @apol wrote:
  
  > Yes, do you have commit/push access? Otherwise we'll push it ourselves.
  
  
  As I don't know, what are you talking about... probably not

REPOSITORY
  R268 KGlobalAccel

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

To: palokisa, graesslin, cfeck, apol
Cc: #frameworks


D5556: build: Remove KService dependency

2017-04-24 Thread Aleix Pol Gonzalez
apol added a comment.


  Yes, do you have commit/push access? Otherwise we'll push it ourselves.

REPOSITORY
  R268 KGlobalAccel

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

To: palokisa, graesslin, cfeck, apol
Cc: #frameworks


D5556: build: Remove KService dependency

2017-04-24 Thread Palo Kisa
palokisa added a comment.


  Sorry, I'm not familiar with the phabricator process... should I take some 
action now?

REPOSITORY
  R268 KGlobalAccel

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

To: palokisa, graesslin, cfeck, apol
Cc: #frameworks


D5557: fix basename handling of po files

2017-04-24 Thread Aleix Pol Gonzalez
apol accepted this revision.
apol added a comment.
This revision is now accepted and ready to land.


  Lgtm, thanks for the test!

INLINE COMMENTS

> build-pofiles.cmake:35
> +# https://bugs.kde.org/show_bug.cgi?id=379116
> +string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" name ${name})
>  get_filename_component(langdir ${pofile} DIRECTORY)

You don't need the second set of ()

REPOSITORY
  R249 KI18n

BRANCH
  master

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

To: sitter, apol, ilic
Cc: #frameworks


D5556: build: Remove KService dependency

2017-04-24 Thread Martin Gräßlin
graesslin accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R268 KGlobalAccel

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

To: palokisa, graesslin, cfeck, apol
Cc: #frameworks


D5515: Update the ungrabMouse hack for Qt 5.8

2017-04-24 Thread David Edmundson
This revision was automatically updated to reflect the committed changes.
Closed by commit R242:29f1ee385891: Update the ungrabMouse hack for Qt 5.8 
(authored by davidedmundson).

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5515?vs=13747=13749

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

AFFECTED FILES
  src/scriptengines/qml/plasmoid/containmentinterface.cpp

To: davidedmundson, #plasma, mart
Cc: anthonyfieroni, mvourlakos, plasma-devel, #frameworks, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol


D5515: Update the ungrabMouse hack for Qt 5.8

2017-04-24 Thread David Edmundson
davidedmundson updated this revision to Diff 13747.
davidedmundson added a comment.


  Rewrote with a runtime check and a link to a qt bug report

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5515?vs=13609=13747

BRANCH
  origin-master (branched from master)

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

AFFECTED FILES
  src/scriptengines/qml/plasmoid/containmentinterface.cpp

To: davidedmundson, #plasma, mart
Cc: anthonyfieroni, mvourlakos, plasma-devel, #frameworks, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol


D5463: Pug/Jade Syntax

2017-04-24 Thread Yunhe Guo
guoyunhe updated this revision to Diff 13734.
guoyunhe added a comment.


  Remove mimetype

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5463?vs=13459=13734

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

AFFECTED FILES
  data/syntax/pug.xml

To: guoyunhe, #framework_syntax_hightlighting, #ktexteditor, #kate
Cc: vkrause, dhaumann, #frameworks


D5463: Pug/Jade Syntax

2017-04-24 Thread Volker Krause
vkrause added a comment.


  yep, keep the mimetype field empty in that case

REPOSITORY
  R216 Syntax Highlighting

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

To: guoyunhe, #framework_syntax_hightlighting, #ktexteditor, #kate
Cc: vkrause, dhaumann, #frameworks


Re: Review Request 130090: Fix incorrect definition of major(3)/minor(3) macros

2017-04-24 Thread KJ Tsanaktsidis


> On April 22, 2017, 10:27 a.m., Lamarque Souza wrote:
> > autotests/CMakeLists.txt, line 66
> > 
> >
> > CMake's developers recommend using else() instead of 
> > else(). The  part used to be required with cmake 
> > 2.6.x, that is not true with cmake 3.x that we use nowadays.
> 
> KJ Tsanaktsidis wrote:
> I'm not sure I understand here - elseif() needs to have the expression to 
> match to enter the elseif() block? In any case I've gone ahead and deleted 
> this because I worked out a cleaner way to do this using cmake generator 
> expressions.
> 
> Lamarque Souza wrote:
> Oh sorry, I did a mistake. I thought it wase a else(). The expression is 
> required for elseif(), the old code was correct. You can revert to the old 
> code, which require less lines of code. Sorry again.

Actually it was not quite correct - it was defining `HAVE_XXX_MAJOR_MINOR=1` 
for when the header was found, but not `HAVE_XXX_MAJOR_MINOR=0` when it wasn't. 
It worked on Linux because `sys/sysmacros.h` was first, but I don't think it 
would work on most BSD's which have it in `sys/types.h` (the `#if 
HAVE_SYSMACROS_MAJOR_MINOR` check wouldn't compile). This version of it sets 
each `HAVE_XXX` macro to either 1 or 0 on all platforms.


- KJ


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130090/#review103087
---


On April 23, 2017, 9:56 a.m., KJ Tsanaktsidis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130090/
> ---
> 
> (Updated April 23, 2017, 9:56 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: solid
> 
> 
> Description
> ---
> 
> Previously, udesksblock.cpp was attempting to find a definition for
> major/minor on Linux in  by checking Q_OS_LINUX before
> importing the header. Q_OS_LINUX is however only set when
> qsystemdetection.h is included, and the macro was being checked first.
> 
> Even had this check worked, it would still be wrong. On a modern version
> of the userspace linux-headers,  includes definitions for
> major and minor that assume each is limited to 8 bits and that dev_t is
> 16 bits. This is no longer true anymore; on Linux, major numbers can be
> up to 12 bits at present and minor numbers up to 20. Calling these
> macros with dev_t values > 2^16 would give incorrect results.
> 
> Because the Q_OS_LINUX check failed, a fallback version of the macros
> were defined for use on all platforms. The code is allegedly copied from
> kdev_t.h, except it is copied from the *kernel* version of the header,
> not the userspace version. Linux internally uses a different
> representation of dev_t than it exposes to userspace - the kernelspace
> version is 20 bits of minor/12 bits of major contiguously, but the
> userspace version packs the bits in a different order to maintain
> compatability with old 16-bit device numbers. Thus, this code also does
> not work for dev_t values > 2^16.
> 
> To fix this, we add CMake rules to search for a system-provided
> definition of the major/minor macros - on various systems, these can be
> in a few different places. As a fallback, we assume old-style 16-bit
> dev_t (although I suspect that is only used for Windows, where
> major/minor numbers are pretty meaningless anyway).
> 
> 
> Diffs
> -
> 
>   autotests/CMakeLists.txt 54adeea62b954b9169b37f1eab8fa3e215fafafa 
>   autotests/fakeUdisks2.h PRE-CREATION 
>   autotests/fakeUdisks2.cpp PRE-CREATION 
>   autotests/solidudisks2test.cpp PRE-CREATION 
>   src/solid/devices/backends/udisks2/CMakeLists.txt 
> 34390064af29ace07cbb3470945be098cc606d04 
>   src/solid/devices/backends/udisks2/udisksblock.cpp 
> 0622ec77fcf670a2005d34b7a6c31ca8b53a18d8 
> 
> Diff: https://git.reviewboard.kde.org/r/130090/diff/
> 
> 
> Testing
> ---
> 
> I've written a little snippet to iterate through block devices, print their 
> major/minor number, and their device properties. It was previously 
> incorrectly labeling all my disks with major 0 and minor == device_number 
> (since it was using the first 20 bits for the minor). It now correctly 
> identifies their major/minor number.
> 
> 
> Thanks,
> 
> KJ Tsanaktsidis
> 
>



D5463: Pug/Jade Syntax

2017-04-24 Thread Yunhe Guo
guoyunhe added a comment.


  I found this part might be a bug in this syntax highlight:
  
mimetype="text/plain"
  
  It will highlight all plain text file to pug syntax. Should I just change 
mimetype to empty? Not sure how to write it for files that don't have 
registered mimetype.

REPOSITORY
  R216 Syntax Highlighting

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

To: guoyunhe, #framework_syntax_hightlighting, #ktexteditor, #kate
Cc: dhaumann, #frameworks


D5557: fix basename handling of po files

2017-04-24 Thread Harald Sitter
sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  get_filename_component(... ... NAME_WE) gets the name without the *longest*
  extension. in case of 'org.kde.plasma.kittens.po' that would leave us
  with 'org' as name. Use a regular expression to grab the basename without
  the short extension (e.g. 'org.kde.plasma.kittens') to prevent broken file
  names.
  
  add a test to assert that this works in the future
  
  BUG: 379116

REPOSITORY
  R249 KI18n

BRANCH
  master

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

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/ki18n_install/CMakeLists.txt
  autotests/ki18n_install/po/de/plasma_applet_org.kde.plasma.katesessions.po
  autotests/ki18n_install/test.cmake
  cmake/build-pofiles.cmake

To: sitter, apol, ilic
Cc: #frameworks


D5556: build: Remove KService dependency

2017-04-24 Thread Palo Kisa
palokisa created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  ..as it's not used anywhere (and the KService isn't some kind of
  "selfinitializing" library, that only needs to be linked to).

REPOSITORY
  R268 KGlobalAccel

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

AFFECTED FILES
  CMakeLists.txt
  src/runtime/CMakeLists.txt

To: palokisa, graesslin, cfeck, apol
Cc: #frameworks