KColorScheme: default to application scheme if set by KColorSchemeManager

Authored by flherne on Feb 19 2017, 8:01 PM.

Description

KColorScheme: default to application scheme if set by KColorSchemeManager

KColorSchemeManager::activateScheme() sets a custom path for the
application's color scheme, with
qApp->setProperty("KDE_COLOR_SCHEME_PATH", index.data(Qt::UserRole));

Currently, the KColorScheme() and KStatefulBrush() constructors will
ignore this and use only the system color scheme, unless an
application-specific config is explicitly loaded and passed in by the
caller.
This is problematic, because most callers assume that the default is to
match the *application* scheme - usually this is equivalent, but it
differs when KColorSchemeManager is used.

For example, when the application of a KTextEditor widget or
KonsolePart has an opposite color scheme to the system, the Find bars
are unreadable.
BUG: 373764

This patch makes KColorScheme() match the application scheme by default
when this differs from the system scheme, which seems preferable to
adding the same code in hundreds of callers.

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