@@ -148,7 +148,7 @@ MprisPlayer::MprisPlayer(const QString& address, QObject* parent): QObject(paren
148
148
}
149
149
150
150
void MprisPlayer::raise () {
151
- if (!this ->canRaise () ) {
151
+ if (!this ->bCanRaise ) {
152
152
qWarning () << " Cannot call raise() on" << this << " because canRaise is false." ;
153
153
return ;
154
154
}
@@ -157,7 +157,7 @@ void MprisPlayer::raise() {
157
157
}
158
158
159
159
void MprisPlayer::quit () {
160
- if (!this ->canQuit () ) {
160
+ if (!this ->bCanQuit ) {
161
161
qWarning () << " Cannot call quit() on" << this << " because canQuit is false." ;
162
162
return ;
163
163
}
@@ -168,7 +168,7 @@ void MprisPlayer::quit() {
168
168
void MprisPlayer::openUri (const QString& uri) { this ->player ->OpenUri (uri); }
169
169
170
170
void MprisPlayer::next () {
171
- if (!this ->canGoNext () ) {
171
+ if (!this ->bCanGoNext ) {
172
172
qWarning () << " Cannot call next() on" << this << " because canGoNext is false." ;
173
173
return ;
174
174
}
@@ -177,7 +177,7 @@ void MprisPlayer::next() {
177
177
}
178
178
179
179
void MprisPlayer::previous () {
180
- if (!this ->canGoPrevious () ) {
180
+ if (!this ->bCanGoPrevious ) {
181
181
qWarning () << " Cannot call previous() on" << this << " because canGoPrevious is false." ;
182
182
return ;
183
183
}
@@ -186,7 +186,7 @@ void MprisPlayer::previous() {
186
186
}
187
187
188
188
void MprisPlayer::seek (qreal offset) {
189
- if (!this ->canSeek () ) {
189
+ if (!this ->bCanSeek ) {
190
190
qWarning () << " Cannot call seek() on" << this << " because canSeek is false." ;
191
191
return ;
192
192
}
@@ -226,7 +226,7 @@ void MprisPlayer::setPosition(qreal position) {
226
226
return ;
227
227
}
228
228
229
- if (!this ->canSeek () ) {
229
+ if (!this ->bCanSeek ) {
230
230
qWarning () << " Cannot set position of" << this << " because canSeek is false." ;
231
231
return ;
232
232
}
@@ -275,7 +275,7 @@ bool MprisPlayer::lengthSupported() const { return this->bInternalLength != -1;
275
275
bool MprisPlayer::volumeSupported () const { return this ->pVolume .exists (); }
276
276
277
277
void MprisPlayer::setVolume (qreal volume) {
278
- if (!this ->canControl () ) {
278
+ if (!this ->bCanControl ) {
279
279
qWarning () << " Cannot set volume of" << this << " because canControl is false." ;
280
280
return ;
281
281
}
@@ -353,7 +353,7 @@ void MprisPlayer::setPlaybackState(MprisPlaybackState::Enum playbackState) {
353
353
354
354
switch (playbackState) {
355
355
case MprisPlaybackState::Stopped:
356
- if (!this ->canControl () ) {
356
+ if (!this ->bCanControl ) {
357
357
qWarning () << " Cannot set playbackState of" << this
358
358
<< " to Stopped because canControl is false." ;
359
359
return ;
@@ -362,15 +362,15 @@ void MprisPlayer::setPlaybackState(MprisPlaybackState::Enum playbackState) {
362
362
this ->player ->Stop ();
363
363
break ;
364
364
case MprisPlaybackState::Playing:
365
- if (!this ->canPlay () ) {
365
+ if (!this ->bCanPlay ) {
366
366
qWarning () << " Cannot set playbackState of" << this << " to Playing because canPlay is false." ;
367
367
return ;
368
368
}
369
369
370
370
this ->player ->Play ();
371
371
break ;
372
372
case MprisPlaybackState::Paused:
373
- if (!this ->canPause () ) {
373
+ if (!this ->bCanPause ) {
374
374
qWarning () << " Cannot set playbackState of" << this << " to Paused because canPause is false." ;
375
375
return ;
376
376
}
@@ -420,7 +420,7 @@ void MprisPlayer::onPlaybackStatusUpdated() {
420
420
bool MprisPlayer::loopSupported () const { return this ->pLoopStatus .exists (); }
421
421
422
422
void MprisPlayer::setLoopState (MprisLoopState::Enum loopState) {
423
- if (!this ->canControl () ) {
423
+ if (!this ->bCanControl ) {
424
424
qWarning () << " Cannot set loopState of" << this << " because canControl is false." ;
425
425
return ;
426
426
}
@@ -468,7 +468,7 @@ void MprisPlayer::setShuffle(bool shuffle) {
468
468
return ;
469
469
}
470
470
471
- if (!this ->canControl () ) {
471
+ if (!this ->bCanControl ) {
472
472
qWarning () << " Cannot set shuffle state of" << this << " because canControl is false." ;
473
473
return ;
474
474
}
@@ -478,7 +478,7 @@ void MprisPlayer::setShuffle(bool shuffle) {
478
478
}
479
479
480
480
void MprisPlayer::setFullscreen (bool fullscreen) {
481
- if (!this ->canSetFullscreen () ) {
481
+ if (!this ->bCanSetFullscreen ) {
482
482
qWarning () << " Cannot set fullscreen for" << this << " because canSetFullscreen is false." ;
483
483
return ;
484
484
}
0 commit comments