mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-09-02 05:39:55 +00:00
another iteration with fix travis tests
This commit is contained in:
@ -18,19 +18,30 @@
|
||||
|
||||
#include "awtestlibrary.h"
|
||||
|
||||
#include <KWindowSystem>
|
||||
#include <QSet>
|
||||
#include <QStandardPaths>
|
||||
|
||||
|
||||
bool AWTestLibrary::isKWinActive()
|
||||
{
|
||||
KWindowSystem::setShowingDesktop(true);
|
||||
bool state = KWindowSystem::showingDesktop();
|
||||
KWindowSystem::setShowingDesktop(false);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
char AWTestLibrary::randomChar()
|
||||
{
|
||||
return 'A' + (rand() % static_cast<int>('Z' - 'A'));
|
||||
return 'A' + (qrand() % static_cast<int>('Z' - 'A'));
|
||||
}
|
||||
|
||||
|
||||
double AWTestLibrary::randomDouble()
|
||||
{
|
||||
return static_cast<double>(rand()) / static_cast<double>(RAND_MAX);
|
||||
return static_cast<double>(qrand()) / static_cast<double>(RAND_MAX);
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +63,7 @@ QPair<QString, QString> AWTestLibrary::randomFilenames()
|
||||
|
||||
int AWTestLibrary::randomInt(const int max)
|
||||
{
|
||||
return rand() % max;
|
||||
return qrand() % max;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user