D8460: Refactor kcm_input to enable having multiple backends.

2017-10-26 Thread Xuetian Weng
xuetianweng updated this revision to Diff 21404.
xuetianweng added a comment.


  Update accroding to subdiff's comment.
  
  Also, I doubt if our X11 backend work on Xwayland. AFAIK Xwayland will only
  get a virtual cursor. Thus I just move the condition to check the name of qpa
  platform for now.

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8460?vs=21274=21404

BRANCH
  master

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

AFFECTED FILES
  kcms/input/CMakeLists.txt
  kcms/input/backends/x11.cmake
  kcms/input/backends/x11/kapplymousetheme.cpp
  kcms/input/backends/x11/x11mousebackend.cpp
  kcms/input/backends/x11/x11mousebackend.h
  kcms/input/kapplymousetheme.cpp
  kcms/input/logging.cpp
  kcms/input/logging.h
  kcms/input/main.cpp
  kcms/input/mouse.cpp
  kcms/input/mouse.h
  kcms/input/mousebackend.cpp
  kcms/input/mousebackend.h
  kcms/input/mousesettings.cpp
  kcms/input/mousesettings.h

To: xuetianweng, subdiff, davidedmundson, ngraham
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8502: Fix brightness not restoring when an inhibition is active

2017-10-26 Thread Kai Uwe Broulik
broulik accepted this revision.
broulik added a comment.
This revision is now accepted and ready to land.


  Wow. Good observation! I bet there's a bug report on Bugzilla about this.
  
  Do you have commit access?

REPOSITORY
  R122 Powerdevil

BRANCH
  fix_restore_brightness

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

To: aleksejshilin, #plasma, broulik
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D8504: Scaled decorations in QPainter mode

2017-10-26 Thread David Edmundson
davidedmundson updated this revision to Diff 21398.
davidedmundson added a comment.
Restricted Application edited projects, added Plasma; removed KWin.


  operationmode

REPOSITORY
  R108 KWin

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8504?vs=21395=21398

BRANCH
  scaled_decs_qpainter

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

AFFECTED FILES
  decorations/decorationrenderer.cpp
  plugins/scenes/qpainter/scene_qpainter.cpp

To: davidedmundson, #plasma, hetzenecker
Cc: ngraham, graesslin, plasma-devel, kwin, #kwin, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D8504: Scaled decorations in QPainter mode

2017-10-26 Thread Martin Flöser
graesslin added inline comments.

INLINE COMMENTS

> decorationrenderer.cpp:42
>  auto markImageSizesDirty = [this]{ m_imageSizesDirty = true; };
> +if (waylandServer()) {
> +connect(client->client(), ::screenChanged, this, 
> markImageSizesDirty);

Please don't check for waylandServer being non-null. Use the operationMode 
instead.

REPOSITORY
  R108 KWin

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

To: davidedmundson, #plasma, hetzenecker
Cc: graesslin, plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8504: Scaled decorations in QPainter mode

2017-10-26 Thread David Edmundson
davidedmundson added a reviewer: hetzenecker.

REPOSITORY
  R108 KWin

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

To: davidedmundson, #plasma, hetzenecker
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8504: Scaled decorations in QPainter mode

2017-10-26 Thread David Edmundson
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: KWin, kwin, plasma-devel.

REVISION SUMMARY
  Under wayland we support high DPI putting by putting a separation
  between the logical co-ordinate system and the resolution of rendered
  assets.
  
  I didn't include window decorations in the previous wayland scaling
  patchset. They were drawn them at a standard resolution, which is
  implicitly scaled up.
  
  This uses the Qt scaling, meaning oxygen and breeze (and others) get
  perfect high DPI support with zero client changes.
  
  Like the window scaling this handles any combination of a 2x scaled
  decoration being rendered on a 1x screen or vice versa.
  
  CCBUG: 384765

TEST PLAN
  export KWIN_COMPOSE=Q
  Had two screens of different scales
  It was the right size on both (as before)
  Was super-sharp on the fancy screen

REPOSITORY
  R108 KWin

BRANCH
  scaled_decs_qpainter

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

AFFECTED FILES
  decorations/decorationrenderer.cpp
  plugins/scenes/qpainter/scene_qpainter.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8481: Adjusted scrollbars to fit the Qt theme

2017-10-26 Thread Sebastian Krzyszkowiak
dos added a comment.


  Oh, so it's a bug? I hope it doesn't get fixed then, as the tiny scrollbars 
look way better :D

REPOSITORY
  R98 Breeze for Gtk

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

To: dos, #breeze, #plasma
Cc: elvisangelaccio, ngraham, apol, plasma-devel, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart


D8485: Fix viewport for screenshot on multiple screens

2017-10-26 Thread David Edmundson
This revision was automatically updated to reflect the committed changes.
Closed by commit R108:9cafbb117984: Fix viewport for screenshot on multiple 
screens (authored by kpiwowarski, committed by davidedmundson).

REPOSITORY
  R108 KWin

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8485?vs=21343=21393

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

AFFECTED FILES
  libkwineffects/kwinglutils.cpp

To: kpiwowarski, #kwin, #plasma, davidedmundson
Cc: davidedmundson, plasma-devel, kwin, #kwin, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D8485: Fix viewport for screenshot on multiple screens

2017-10-26 Thread Kamil Piwowarski
kpiwowarski added a comment.


  @davidedmundson How can I commit? This is my first contribution here. Could 
you that?

REPOSITORY
  R108 KWin

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

To: kpiwowarski, #kwin, #plasma, davidedmundson
Cc: davidedmundson, plasma-devel, kwin, #kwin, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D8503: Fix glScissor calls with y-offset screens

2017-10-26 Thread David Edmundson
This revision was automatically updated to reflect the committed changes.
Closed by commit R108:019d4bf4257d: Fix glScissor calls with y-offset screens 
(authored by davidedmundson).

REPOSITORY
  R108 KWin

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8503?vs=21389=21391

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

AFFECTED FILES
  libkwineffects/kwinglutils.cpp

To: davidedmundson, #plasma, graesslin
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8503: Fix glScissor calls with y-offset screens

2017-10-26 Thread Martin Flöser
graesslin accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R108 KWin

BRANCH
  master

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

To: davidedmundson, #plasma, graesslin
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8503: Fix glScissor calls with y-offset screens

2017-10-26 Thread David Edmundson
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: KWin, kwin, plasma-devel.

REVISION SUMMARY
  As per the glViewport patches yesterday.

TEST PLAN
  Vertically stacked monitors
  minimised something, it animated properly

REPOSITORY
  R108 KWin

BRANCH
  master

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

AFFECTED FILES
  libkwineffects/kwinglutils.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart


D8502: Fix brightness not restoring when an inhibition is active

2017-10-26 Thread Алексей Шилин
aleksejshilin added a comment.


  I've created a script to demonstrate the issue (attached). It uses VLC to 
acquire inhibition after the screen is dimmed.
  
  Usage: ./test_restore_brightness.sh F5451108: 
test_restore_brightness.sh 

REPOSITORY
  R122 Powerdevil

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

To: aleksejshilin, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8502: Fix brightness not restoring when an inhibition is active

2017-10-26 Thread Алексей Шилин
aleksejshilin created this revision.
aleksejshilin added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  An active inhibition with ChangeScreenSettings policy won't
  allow to restore dimmed screen brightness normally. In this
  case the user will be left with a barely visible screen,
  requiring him/her to manually adjust the brightness back to
  normal.
  
  This commit enforces dimmed screen brightness restoration
  even if ChangeScreenSettings policy is unavailable.

REPOSITORY
  R122 Powerdevil

BRANCH
  fix_restore_brightness

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

AFFECTED FILES
  daemon/actions/bundled/dimdisplay.cpp
  daemon/actions/bundled/dimdisplay.h

To: aleksejshilin, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8493: Make Folder View screen aware

2017-10-26 Thread Kai Uwe Broulik
broulik added inline comments.

INLINE COMMENTS

> amantia wrote in foldermodel.cpp:1314
> It can be and it is reached. m_screen != -1 means it is a containment, screen 
> == -1 means there is no screen information stored yet. This happens e.g when 
> using the updated code with an existing plasma-*appletsrc file.

Sorry, I misread both as `m_screen`

> amantia wrote in foldermodel.cpp:1659
> This is not a cast between library boundaries, but I don't mind to use 
> qobject_cast either.

It's faster.

> amantia wrote in screenmapper.cpp:51
> I need both the key and the value and AFAIK it is not supported in current Qt 
> version.

Right. Again, misread something :)

REPOSITORY
  R119 Plasma Desktop

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

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: broulik, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D8500: Add prefix for private variable

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:3d3783eef567: Add prefix for private variable (authored 
by mlaurent).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8500?vs=21380=21381

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

AFFECTED FILES
  containments/desktop/plugins/folder/mimetypesmodel.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h

To: mlaurent, hein, davidedmundson
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8500: Add prefix for private variable

2017-10-26 Thread David Edmundson
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  add_prefix_for_private_variable

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

To: mlaurent, hein, davidedmundson
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8500: Add prefix for private variable

2017-10-26 Thread Laurent Montel
mlaurent added a reviewer: hein.

REPOSITORY
  R119 Plasma Desktop

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

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8500: Add prefix for private variable

2017-10-26 Thread Laurent Montel
mlaurent created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

TEST PLAN
  compile

REPOSITORY
  R119 Plasma Desktop

BRANCH
  add_prefix_for_private_variable

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

AFFECTED FILES
  containments/desktop/plugins/folder/mimetypesmodel.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h

To: mlaurent
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8493: Make Folder View screen aware

2017-10-26 Thread Andras Mantia
amantia added a comment.


  I've added some comments, I will address the ones I did not comment in a 
follow-up patch.

INLINE COMMENTS

> broulik wrote in main.xml:40
> What's the purpose of `hidden=true`?

AFAIK it is not used in the GUI config. See also the others in the same file.

> broulik wrote in foldermodel.cpp:1310
> Why not store a `QUrl`?

Mostly due to the hash and also because for the configuration it anyway needs 
to be turned into a string (and it is the same as the Positioner does).

> broulik wrote in foldermodel.cpp:1314
> This can never be reached

It can be and it is reached. m_screen != -1 means it is a containment, screen 
== -1 means there is no screen information stored yet. This happens e.g when 
using the updated code with an existing plasma-*appletsrc file.

> broulik wrote in foldermodel.cpp:1659
> Use `qobject_cast` (but this would not be neccessary, see my comment on the 
> `Q_PROPERTY` above)

This is not a cast between library boundaries, but I don't mind to use 
qobject_cast either.

> broulik wrote in folderplugin.cpp:66
> Using this is asking for trouble. Plasma uses shared engines for all applets, 
> so this context property would be accessible to anyone. I would prefer that 
> you used a singleton type.

I was thinking about using a singleton, this pushed me towards it. :)

> broulik wrote in screenmapper.cpp:51
> Range-for?

I need both the key and the value and AFAIK it is not supported in current Qt 
version.

> broulik wrote in screenmapper.h:21
> You can use `#pragma once`

Not common in KDE code though (at least wasn't earlier when I was more involved 
and can't find anything like that in plasma-desktop)

REPOSITORY
  R119 Plasma Desktop

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

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: broulik, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D8499: Constify some methods

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:e795b8b721c5: Constify some methods (authored by 
mlaurent).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8499?vs=21378=21379

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

AFFECTED FILES
  containments/desktop/plugins/folder/menuhelper.cpp
  containments/desktop/plugins/folder/menuhelper.h
  containments/desktop/plugins/folder/placesmodel.cpp
  containments/desktop/plugins/folder/placesmodel.h
  containments/desktop/plugins/folder/rubberband.cpp
  containments/desktop/plugins/folder/rubberband.h

To: mlaurent, hein, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8499: Constify some methods

2017-10-26 Thread Kai Uwe Broulik
broulik accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  const_ify_method

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

To: mlaurent, hein, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8499: Constify some methods

2017-10-26 Thread Laurent Montel
mlaurent added a reviewer: hein.

REPOSITORY
  R119 Plasma Desktop

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

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8499: Constify some methods

2017-10-26 Thread Laurent Montel
mlaurent created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

TEST PLAN
  compile

REPOSITORY
  R119 Plasma Desktop

BRANCH
  const_ify_method

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

AFFECTED FILES
  containments/desktop/plugins/folder/menuhelper.cpp
  containments/desktop/plugins/folder/menuhelper.h
  containments/desktop/plugins/folder/placesmodel.cpp
  containments/desktop/plugins/folder/placesmodel.h
  containments/desktop/plugins/folder/rubberband.cpp
  containments/desktop/plugins/folder/rubberband.h

To: mlaurent
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8447: Add unit tests for Folder View

2017-10-26 Thread Laurent Montel
mlaurent updated this revision to Diff 21377.
mlaurent added a comment.


  - Add more autotest. Test default value. Test menu action

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8447?vs=21376=21377

BRANCH
  arcpatch-D8447

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

AFFECTED FILES
  containments/desktop/plugins/folder/CMakeLists.txt
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/folderplugin_private_export.h
  containments/desktop/plugins/folder/positioner.h
  containments/desktop/plugins/folder/tests/CMakeLists.txt
  containments/desktop/plugins/folder/tests/foldermodeltest.cpp
  containments/desktop/plugins/folder/tests/foldermodeltest.h
  containments/desktop/plugins/folder/tests/positionertest.cpp
  containments/desktop/plugins/folder/tests/positionertest.h

To: amantia, #plasma, ervin, hein, mlaurent, aacid, dvratil, franckarrecot, 
renatoo, olivierjg
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8447: Add unit tests for Folder View

2017-10-26 Thread Andras Mantia
amantia updated this revision to Diff 21376.
amantia added a comment.


  Now add back the generate_export_header for real

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8447?vs=21375=21376

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

AFFECTED FILES
  containments/desktop/plugins/folder/CMakeLists.txt
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/folderplugin_private_export.h
  containments/desktop/plugins/folder/positioner.h
  containments/desktop/plugins/folder/tests/CMakeLists.txt
  containments/desktop/plugins/folder/tests/foldermodeltest.cpp
  containments/desktop/plugins/folder/tests/foldermodeltest.h
  containments/desktop/plugins/folder/tests/positionertest.cpp
  containments/desktop/plugins/folder/tests/positionertest.h

To: amantia, #plasma, ervin, hein, mlaurent, aacid, dvratil, franckarrecot, 
renatoo, olivierjg
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8447: Add unit tests for Folder View

2017-10-26 Thread Andras Mantia
amantia updated this revision to Diff 21375.
amantia added a comment.


  Add back unintentionally removed generate_export_header

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8447?vs=21287=21375

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

AFFECTED FILES
  containments/desktop/plugins/folder/CMakeLists.txt
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/folderplugin_private_export.h
  containments/desktop/plugins/folder/positioner.h
  containments/desktop/plugins/folder/tests/CMakeLists.txt
  containments/desktop/plugins/folder/tests/foldermodeltest.cpp
  containments/desktop/plugins/folder/tests/foldermodeltest.h
  containments/desktop/plugins/folder/tests/positionertest.cpp
  containments/desktop/plugins/folder/tests/positionertest.h

To: amantia, #plasma, ervin, hein, mlaurent, aacid, dvratil, franckarrecot, 
renatoo, olivierjg
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8493: Make Folder View screen aware

2017-10-26 Thread Kai Uwe Broulik
broulik added a comment.


  Regardless of whether this is the right way to go, I put some coding style 
and practise comments on the code, so you know what to look for in the future / 
in general :)

INLINE COMMENTS

> main.xml:40
>  
> +
> +

What's the purpose of `hidden=true`?

> foldermodel.cpp:1310
> +
> +const QString name = item.url().toString();
> +if (m_usedByContainment) {

Why not store a `QUrl`?

> foldermodel.cpp:1314
> +if (m_screen != -1) {
> +if (screen == -1)
> +m_screenMapper->addMapping(name, m_screen);

This can never be reached

> foldermodel.cpp:1316
> +m_screenMapper->addMapping(name, m_screen);
> +else  if (m_screen != screen)
> +return false;

Coding style: one space between `else` and `if`, also put braces even around 
one line statements.

> foldermodel.cpp:1659
> +{
> +const auto mapper = dynamic_cast(screenMapper);
> +if (!mapper || m_screenMapper == mapper)

Use `qobject_cast` (but this would not be neccessary, see my comment on the 
`Q_PROPERTY` above)

> foldermodel.h:100
> +Q_PROPERTY(int screen READ screen WRITE setScreen NOTIFY screenChanged)
> +Q_PROPERTY(QObject* screenMapper READ screenMapper WRITE setScreenMapper 
> NOTIFY screenMapperChanged)
>  

You can use `ScreenMapper *` as property type if you did 
`qmlRegisterType()` on it.

Also note that QML engine sucks at resolving namespaces, so you might need to 
fully qualify it should it be in a namespace.

> foldermodel.h:190
> +
> +QObject* screenMapper() const;
> +void setScreenMapper(QObject* screenMapper);

Coding style: space //before// `*`, ie `QObject *foo()`

> folderplugin.cpp:66
>  
> +void FolderPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
> +{

Using this is asking for trouble. Plasma uses shared engines for all applets, 
so this context property would be accessible to anyone. I would prefer that you 
used a singleton type.

> screenmapper.cpp:50
> +{
> +QStringList result;
> +auto it = m_screenUrlMap.constBegin();

Add `reserve()` call, ie `result.reserve(screenUrlMap.count() * 2)`

> screenmapper.cpp:51
> +QStringList result;
> +auto it = m_screenUrlMap.constBegin();
> +while (it != m_screenUrlMap.constEnd()) {

Range-for?

> screenmapper.cpp:79
> +{
> +if (m_screenUrlMap.contains(url)) {
> +return m_screenUrlMap[url];

Avoid double look-up:

  return m_screenUrlMap.value(url, -1);

the second argument is the default value to return if the item does not exist.

> screenmapper.h:21
> + ***/
> +#ifndef SCREENMAPPER_H
> +#define SCREENMAPPER_H

You can use `#pragma once`

> screenmapper.h:34
> +explicit ScreenMapper(QObject *parent = nullptr);
> +
> +QStringList screenMapping() const;

We typically explicitly add a default destructor.

  ~ScreenMapper() override = default;

REPOSITORY
  R119 Plasma Desktop

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

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: broulik, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D8493: Make Folder View screen aware

2017-10-26 Thread Andras Mantia
amantia added a comment.


  Just to make clear, this is the first step and would not commit before the 
problems with display removing/additions are solved. The ideas for doing that 
are:
  
  - keep per screen configuration and per desktop setting: e.g a different set 
of position for icons if one, two, three screen are used
  - keep per desktop configuration, but not per screen combinaton: if a display 
is removed, the items from there are moved to a visible display, although their 
positions are remembered so when it is plugged back, it goes to the right 
place. If meantime the user rearranged the icons on the visible display, the 
configuration for the non-visible screens is forgotten.

REPOSITORY
  R119 Plasma Desktop

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

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D8493: Make Folder View screen aware

2017-10-26 Thread Marco Martin
mart added a comment.


  I think this is really asking for a lot of trouble.
  
  what happens when a screen is dinamically added/removed?

REPOSITORY
  R119 Plasma Desktop

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

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D8493: Make Folder View screen aware

2017-10-26 Thread Andras Mantia
amantia created this revision.
amantia added reviewers: Plasma, ervin, mlaurent, dvratil, hein, aacid.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  When using multiple screen with a Folder View as a desktop containment, we 
need to make sure a file belongs only to one screen. The patch adds support for 
this by:
  
  1. Introducing a ScreenMapper object shared acrossed all Folder Views
  2. FolderModel registers the screen it resides on if used as a containment
  3. FolderModel filters out items not on the current screen (if used as a 
containment)
  4. FolderModel adds mapping for the newly appeared files. The new files will 
go to the registered screen having the smallest id. This also means by default 
all files appear on the screen with the smallest id.
  5. url/screen mapping is stored in the configuration of each folder view 
applet. This means duplication of the information, and although they should be 
in sync unless manually modified, the logic is that the last view's mapping 
option is used.

REPOSITORY
  R119 Plasma Desktop

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

AFFECTED FILES
  containments/desktop/package/contents/config/main.xml
  containments/desktop/package/contents/ui/FolderView.qml
  containments/desktop/package/contents/ui/FolderViewLayer.qml
  containments/desktop/plugins/folder/CMakeLists.txt
  containments/desktop/plugins/folder/foldermodel.cpp
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/folderplugin.cpp
  containments/desktop/plugins/folder/folderplugin.h
  containments/desktop/plugins/folder/screenmapper.cpp
  containments/desktop/plugins/folder/screenmapper.h

To: amantia, #plasma, ervin, mlaurent, dvratil, hein, aacid
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8469: Use XDG_DATA_HOME and security fix

2017-10-26 Thread Crypto Dude
cryptodude updated this revision to Diff 21364.
cryptodude retitled this revision from "Use XDG_DATA_DIR and security fix" to 
"Use XDG_DATA_HOME and security fix".
cryptodude edited the summary of this revision.
cryptodude added a comment.


  Updated git and task comments to use XDG_DATA_HOME.

REPOSITORY
  R845 Plasma Vault

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8469?vs=21363=21364

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

AFFECTED FILES
  kded/ui/directorypairchooserwidget.cpp
  kded/ui/directorypairchooserwidget.h
  kded/ui/vaultcreationwizard.cpp

To: cryptodude, ivan, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8469: Use XDG_DATA_DIR and security fix

2017-10-26 Thread Crypto Dude
cryptodude added a comment.


  In https://phabricator.kde.org/D8469#160263, @cryptodude wrote:
  
  > Updated to use QStandardPaths
  
  
  Hmm,
  
  I forgot to test if the XDG_DATA_DIR actually is honoured by the 
QStandardDirs, and a quick test shows that it doesn't. I'll have to find out 
what the rest of KDE uses, as the usage of ~/.local/share is an upgrade, but I 
expected more.

REPOSITORY
  R845 Plasma Vault

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

To: cryptodude, ivan, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8481: Adjusted scrollbars to fit the Qt theme

2017-10-26 Thread Elvis Angelaccio
elvisangelaccio added a comment.


  We recently adjusted the gtk3 scrollbars (see 
https://phabricator.kde.org/D6688), I'm not sure why your Qt scrollbars are so 
tiny... (maybe hi-DPI related?)

REPOSITORY
  R98 Breeze for Gtk

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

To: dos, #breeze, #plasma
Cc: elvisangelaccio, ngraham, apol, plasma-devel, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart


D8469: Use XDG_DATA_DIR and security fix

2017-10-26 Thread Crypto Dude
cryptodude updated this revision to Diff 21363.
cryptodude added a comment.


  Updated to use QStandardPaths

REPOSITORY
  R845 Plasma Vault

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8469?vs=21303=21363

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

AFFECTED FILES
  kded/ui/directorypairchooserwidget.cpp
  kded/ui/directorypairchooserwidget.h
  kded/ui/vaultcreationwizard.cpp

To: cryptodude, ivan, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8476: qPort to new connect api + use const'ref

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:b706bc73fa63: qPort to new connect api + use 
constref (authored by mlaurent).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8476?vs=21324=21357

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

AFFECTED FILES
  containments/desktop/plugins/folder/foldermodel.cpp
  containments/desktop/plugins/folder/foldermodel.h

To: mlaurent, hein
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:b95bdf216b8f: Modernize code. Use nullptr where its 
possible (authored by mlaurent).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D8473?vs=21348=21356#toc

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8473?vs=21348=21356

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

AFFECTED FILES
  containments/desktop/plugins/folder/directorypicker.cpp
  containments/desktop/plugins/folder/foldermodel.cpp
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/labelgenerator.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h
  containments/desktop/plugins/folder/placesmodel.h
  containments/desktop/plugins/folder/positioner.cpp
  containments/desktop/plugins/folder/positioner.h
  containments/desktop/plugins/folder/previewpluginsmodel.cpp
  containments/desktop/plugins/folder/previewpluginsmodel.h
  containments/desktop/plugins/folder/rubberband.h
  containments/desktop/plugins/folder/shortcut.h
  containments/desktop/plugins/folder/viewpropertiesmenu.cpp
  containments/desktop/plugins/folder/viewpropertiesmenu.h

To: mlaurent, hein
Cc: broulik, ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D8488: Clean forward declaration

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:9d0b117f6fed: Clean forward declaration (authored by 
mlaurent).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8488?vs=21349=21355

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

AFFECTED FILES
  containments/desktop/plugins/folder/menuhelper.h
  containments/desktop/plugins/folder/subdialog.h

To: mlaurent, hein, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8489: Clean includes

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:12a1360101cf: Clean includes (authored by mlaurent).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8489?vs=21350=21354

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

AFFECTED FILES
  containments/desktop/plugins/folder/folderplugin.cpp
  containments/desktop/plugins/folder/folderplugin.h
  containments/desktop/plugins/folder/labelgenerator.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Eike Hein
hein accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  modernize_folderplugin

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

To: mlaurent, hein
Cc: broulik, ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D8476: qPort to new connect api + use const'ref

2017-10-26 Thread Eike Hein
hein accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  port_to_new_connect_api

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

To: mlaurent, hein
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D8488: Clean forward declaration

2017-10-26 Thread Eike Hein
hein accepted this revision.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  clean_forward_declaration

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

To: mlaurent, hein, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8489: Clean includes

2017-10-26 Thread Eike Hein
hein accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  clean_includes

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

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8488: Clean forward declaration

2017-10-26 Thread Kai Uwe Broulik
broulik accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  clean_forward_declaration

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

To: mlaurent, hein, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8489: Clean includes

2017-10-26 Thread Laurent Montel
mlaurent created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

TEST PLAN
  compile

REPOSITORY
  R119 Plasma Desktop

BRANCH
  clean_includes

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

AFFECTED FILES
  containments/desktop/plugins/folder/folderplugin.cpp
  containments/desktop/plugins/folder/folderplugin.h
  containments/desktop/plugins/folder/labelgenerator.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h

To: mlaurent
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8489: Clean includes

2017-10-26 Thread Laurent Montel
mlaurent added a reviewer: hein.

REPOSITORY
  R119 Plasma Desktop

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

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8488: Clean forward declaration

2017-10-26 Thread Laurent Montel
mlaurent added a reviewer: hein.

REPOSITORY
  R119 Plasma Desktop

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

To: mlaurent, hein
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8488: Clean forward declaration

2017-10-26 Thread Laurent Montel
mlaurent created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

TEST PLAN
  compile

REPOSITORY
  R119 Plasma Desktop

BRANCH
  clean_forward_declaration

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

AFFECTED FILES
  containments/desktop/plugins/folder/menuhelper.h
  containments/desktop/plugins/folder/subdialog.h

To: mlaurent
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Laurent Montel
mlaurent updated this revision to Diff 21348.
mlaurent added a comment.


  - Perhaps gcc/clang can optimize it.

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8473?vs=21309=21348

BRANCH
  modernize_folderplugin

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

AFFECTED FILES
  containments/desktop/plugins/folder/directorypicker.cpp
  containments/desktop/plugins/folder/foldermodel.cpp
  containments/desktop/plugins/folder/foldermodel.h
  containments/desktop/plugins/folder/labelgenerator.cpp
  containments/desktop/plugins/folder/mimetypesmodel.h
  containments/desktop/plugins/folder/placesmodel.h
  containments/desktop/plugins/folder/positioner.cpp
  containments/desktop/plugins/folder/positioner.h
  containments/desktop/plugins/folder/previewpluginsmodel.cpp
  containments/desktop/plugins/folder/previewpluginsmodel.h
  containments/desktop/plugins/folder/rubberband.h
  containments/desktop/plugins/folder/shortcut.h
  containments/desktop/plugins/folder/viewpropertiesmenu.cpp
  containments/desktop/plugins/folder/viewpropertiesmenu.h

To: mlaurent, hein
Cc: broulik, ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart