Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[lipstick] Deprecate HINT_MAX_CONTENT_LINES / maxContentLines. JB#50243
  • Loading branch information
Bea Lam committed Jul 23, 2020
1 parent 6c5d366 commit 1bb4bd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/notifications/lipsticknotification.h
Expand Up @@ -135,7 +135,7 @@ class LIPSTICK_EXPORT LipstickNotification : public QObject
//! Nemo hint: Indicates the identifer of the owner for notification
static const char *HINT_OWNER;

//! Nemo hint: Specifies the maximum number of content lines to display (including summary)
//! \obsolete Nemo hint: Specifies the maximum number of content lines to display (including summary)
static const char *HINT_MAX_CONTENT_LINES;

//! Nemo hint: Indicates that this notification has been restored from persistent storage since the last update.
Expand Down
4 changes: 0 additions & 4 deletions tests/ut_lipsticknotification/ut_lipsticknotification.cpp
Expand Up @@ -31,7 +31,6 @@ void Ut_Notification::testGettersAndSetters()
int urgency = 1;
int itemCount = 1;
int priority = 1;
int maxContentLines = 3;
QString category = "category1";
QStringList actions = QStringList() << "action1a" << "action1b";
QDateTime timestamp = QDateTime::currentDateTime();
Expand All @@ -43,7 +42,6 @@ void Ut_Notification::testGettersAndSetters()
hints.insert(LipstickNotification::HINT_PREVIEW_BODY, previewBody);
hints.insert(LipstickNotification::HINT_URGENCY, urgency);
hints.insert(LipstickNotification::HINT_CATEGORY, category);
hints.insert(LipstickNotification::HINT_MAX_CONTENT_LINES, maxContentLines);
hints.insert("x-nemo.testing.custom-hint-value", M_PI);
int expireTimeout = 1;

Expand All @@ -64,11 +62,9 @@ void Ut_Notification::testGettersAndSetters()
QCOMPARE(notification.itemCount(), itemCount);
QCOMPARE(notification.priority(), priority);
QCOMPARE(notification.category(), category);
QCOMPARE(notification.maxContentLines(), maxContentLines);
QVERIFY(notification.hintValues().count() > 0);
QVERIFY(notification.hintValues().contains("x-nemo.testing.custom-hint-value"));
QVERIFY(!notification.hintValues().contains(LipstickNotification::HINT_CATEGORY));
QVERIFY(!notification.hintValues().contains(LipstickNotification::HINT_MAX_CONTENT_LINES));
QCOMPARE(notification.hintValues().value("x-nemo.testing.custom-hint-value").toDouble(), M_PI);

appName = "appName2";
Expand Down

0 comments on commit 1bb4bd0

Please sign in to comment.