Prevent unused variable warnings when building for tests

icc-effect-5.26.4
Andreas Hartmetz 2021-01-15 13:48:23 +01:00
parent 870a9e4d06
commit 667177d6cb
1 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,7 @@ int Screens::number(const QPoint &pos) const
// TODO: Do something about testScreens and other tests that use MockScreens.
// They only make core code more convoluted with ifdefs.
#ifdef KWIN_UNIT_TEST
Q_UNUSED(pos)
return -1;
#else
int bestScreen = 0;
@ -289,6 +290,7 @@ AbstractOutput *Screens::findOutput(int screen) const
// TODO: Do something about testScreens and other tests that use MockScreens.
// They only make core code more convoluted with ifdefs.
#ifdef KWIN_UNIT_TEST
Q_UNUSED(screen)
return nullptr;
#else
return kwinApp()->platform()->findOutput(screen);