fixed mass import

This commit is contained in:
Syping 2018-06-16 05:28:56 +02:00
parent caffd9f246
commit 06a8657423
2 changed files with 6 additions and 5 deletions

View file

@ -121,6 +121,9 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre
}
#endif
// Seed RNG
pcg32_srandom_r(&rng, time(NULL), (intptr_t)&rng);
setMouseTracking(true);
installEventFilter(this);
}
@ -804,7 +807,6 @@ bool ProfileInterface::importFile(QString selectedFile, QDateTime importDateTime
bool ProfileInterface::importSnapmaticPicture(SnapmaticPicture *picture, bool warn)
{
QString picFileName = picture->getPictureFileName();
qDebug() << picFileName;
QString adjustedFileName = picture->getOriginalPictureFileName();
if (picFileName.left(4) != "PGTA")
{
@ -1946,9 +1948,6 @@ preSelectionTitle:
int ProfileInterface::getRandomUid()
{
pcg32_random_t rng;
pcg32_srandom_r(&rng, time(NULL), (intptr_t)&rng);
int random_int = pcg32_boundedrand_r(&rng, 2147483647);
qDebug() << random_int;
return random_int;
}

View file

@ -29,6 +29,7 @@
#include "ExportThread.h"
#include "SavegameData.h"
#include "CrewDatabase.h"
#include "pcg_basic.h"
#include <QProgressDialog>
#include <QSpacerItem>
#include <QDateTime>
@ -107,6 +108,7 @@ private:
QString profileName;
QString loadingStr;
QString language;
pcg32_random_t rng;
bool contextMenuOpened;
bool isProfileLoaded;
int selectedWidgts;
@ -124,7 +126,7 @@ private:
void insertSnapmaticIPI(QWidget *widget);
void insertSavegameIPI(QWidget *widget);
void sortingProfileInterface();
static int getRandomUid();
int getRandomUid();
signals:
void profileLoaded();