~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/ucubuntushape.cpp

  • Committer: CI Train Bot
  • Author(s): Christian Dywan, Zsombor Egri, Zoltán Balogh, Tim Peeters, Albert Astals Cid, Michael Sheldon, Benjamin Zeller
  • Date: 2015-12-17 17:13:49 UTC
  • mfrom: (1000.739.27 OTA9-landing-2015-12-16)
  • Revision ID: ci-train-bot@canonical.com-20151217171349-8xwclnhnx8v9oz4m
OTA9-landing-2015-12-16
Approved by: Zoltan Balogh

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "ucubuntushapetexture.h"
30
30
#include "ucunits.h"
31
31
#include "ucnamespace.h"
32
 
#include "quickutils.h"
 
32
#include <QtCore/QPointer>
33
33
#include <QtGui/QGuiApplication>
34
34
#include <QtQml/QQmlInfo>
35
35
#include <QtQuick/private/qsgadaptationlayer_p.h>
810
810
*/
811
811
void UCUbuntuShape::setColor(const QColor& color)
812
812
{
813
 
    static bool loggedOnce = false;
814
 
    if (isVersionGreaterThanOrEqual(Version13) && !loggedOnce) {
815
 
        loggedOnce = true;
816
 
        qmlInfo(this) << "'color' is deprecated. Use 'backgroundColor', 'secondaryBackgroundColor' "
817
 
            "and 'backgroundMode' instead.";
818
 
    }
 
813
    Q_UNUSED(color);
 
814
    if (isVersionGreaterThanOrEqual(Version13))
 
815
        UC_QML_DEPRECATION_WARNING("'color' is deprecated. Use 'backgroundColor', 'secondaryBackgroundColor' and 'backgroundMode' instead.");
819
816
 
820
817
    if (!(m_flags & BackgroundApiSet)) {
821
818
        const QRgb colorRgb = qRgba(color.red(), color.green(), color.blue(), color.alpha());
843
840
*/
844
841
void UCUbuntuShape::setGradientColor(const QColor& gradientColor)
845
842
{
846
 
    static bool loggedOnce = false;
847
 
    if (isVersionGreaterThanOrEqual(Version13) && !loggedOnce) {
848
 
        loggedOnce = true;
849
 
        qmlInfo(this) << "'gradientColor' is deprecated. Use 'backgroundColor', "
850
 
            "'secondaryBackgroundColor' and 'backgroundMode' instead.";
851
 
    }
 
843
    if (isVersionGreaterThanOrEqual(Version13))
 
844
        UC_QML_DEPRECATION_WARNING("'gradientColor' is deprecated. Use 'backgroundColor', 'secondaryBackgroundColor' and 'backgroundMode' instead.");
852
845
 
853
846
    if (!(m_flags & BackgroundApiSet)) {
854
847
        m_flags |= GradientColorSet;
874
867
*/
875
868
void UCUbuntuShape::setImage(const QVariant& image)
876
869
{
877
 
    static bool loggedOnce = false;
878
 
    if (isVersionGreaterThanOrEqual(Version13) && !loggedOnce) {
879
 
        loggedOnce = true;
880
 
        qmlInfo(this) << "'image' is deprecated. Use 'source' instead.";
881
 
    }
 
870
    if (isVersionGreaterThanOrEqual(Version13))
 
871
        UC_QML_DEPRECATION_WARNING("'image' is deprecated. Use 'source' instead.");
882
872
 
883
873
    if (!(m_flags & SourceApiSet)) {
884
874
        QQuickItem* newImage = qobject_cast<QQuickItem*>(qvariant_cast<QObject*>(image));