mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
reworked settings
now there is only one global object for loading and saving settings RshareSettings *Settings; the class RSettings can be used too, but it is not prefered, because the default settings has no affect git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e68e6b54ef
commit
6baf56285b
39 changed files with 336 additions and 390 deletions
|
@ -56,9 +56,7 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
|||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
RshareSettings settings;
|
||||
|
||||
settings.loadWidgetInformation(this);
|
||||
Settings->loadWidgetInformation(this);
|
||||
this->move(qrand()%100, qrand()%100); //avoid to stack multiple popup chat windows on the same position
|
||||
|
||||
|
||||
|
@ -229,8 +227,7 @@ void PopupChatDialog::flash()
|
|||
|
||||
void PopupChatDialog::closeEvent (QCloseEvent * event)
|
||||
{
|
||||
RshareSettings settings;
|
||||
settings.saveWidgetInformation(this);
|
||||
Settings->saveWidgetInformation(this);
|
||||
|
||||
hide();
|
||||
event->ignore();
|
||||
|
@ -291,8 +288,7 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
|||
std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
RSettings settings(QString("Chat"));
|
||||
if (settings.value(QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool())
|
||||
if (Settings->valueFromGroup(QString("Chat"), QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool())
|
||||
{
|
||||
QHashIterator<QString, QString> i(smileys);
|
||||
while(i.hasNext())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue