QTfrontend/hwform.cpp
changeset 2874 3c7c2bf1ba38
parent 2845 19db164dd20d
child 2948 3f21a9dc93d0
equal deleted inserted replaced
2873:e7acb0251a22 2874:3c7c2bf1ba38
    32 #include <QAction>
    32 #include <QAction>
    33 #include <QTimer>
    33 #include <QTimer>
    34 #include <QScrollBar>
    34 #include <QScrollBar>
    35 #include <QDataWidgetMapper>
    35 #include <QDataWidgetMapper>
    36 #include <QTableView>
    36 #include <QTableView>
       
    37 #include <QCryptographicHash>
    37 
    38 
    38 #include "hwform.h"
    39 #include "hwform.h"
    39 #include "game.h"
    40 #include "game.h"
    40 #include "team.h"
    41 #include "team.h"
    41 #include "namegen.h"
    42 #include "namegen.h"
    66 #endif
    67 #endif
    67 
    68 
    68 // I started handing this down to each place it touches, but it was getting ridiculous
    69 // I started handing this down to each place it touches, but it was getting ridiculous
    69 // and this one flag does not warrant a static class
    70 // and this one flag does not warrant a static class
    70 bool frontendEffects = true;
    71 bool frontendEffects = true;
       
    72 QString playerHash;
    71 
    73 
    72 HWForm::HWForm(QWidget *parent)
    74 HWForm::HWForm(QWidget *parent)
    73   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
    75   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
    74 {
    76 {
    75 #ifdef USE_XFIRE
    77 #ifdef USE_XFIRE
    76 	xfire_init();
    78 	xfire_init();
    77 #endif
    79 #endif
    78     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
    80     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
    79     frontendEffects = gameSettings->value("video/frontendeffects", true).toBool();
    81     frontendEffects = gameSettings->value("video/frontendeffects", true).toBool();
       
    82     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
    80 
    83 
    81 	ui.setupUi(this);
    84 	ui.setupUi(this);
    82 
    85 
    83 	CustomizePalettes();
    86 	CustomizePalettes();
    84 	
    87