Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
1da5a889
Commit
1da5a889
authored
6 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
settings: fix crash when there no accounts present
Change-Id: I02383c1a8916ea2088e1145f18b41321dc9442b2
parent
c4e86975
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
advancedsettingswidget.cpp
+10
-10
10 additions, 10 deletions
advancedsettingswidget.cpp
advancedsettingswidget.h
+2
-2
2 additions, 2 deletions
advancedsettingswidget.h
settingswidget.cpp
+1
-0
1 addition, 0 deletions
settingswidget.cpp
with
13 additions
and
12 deletions
advancedsettingswidget.cpp
+
10
−
10
View file @
1da5a889
...
@@ -15,13 +15,15 @@
...
@@ -15,13 +15,15 @@
* You should have received a copy of the GNU General Public License *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
**************************************************************************/
#include
"advancedsettingswidget.h"
#include
"ui_advancedsettingswidget.h"
#include
<QFileDialog>
#include
<QFileDialog>
#include
"lrcinstance.h"
#include
"api/newcodecmodel.h"
#include
"api/newcodecmodel.h"
#include
"
advancedsettingswidget
.h"
#include
"
lrcinstance
.h"
#include
"u
i_advancedsettingswidget
.h"
#include
"u
tils
.h"
AdvancedSettingsWidget
::
AdvancedSettingsWidget
(
QWidget
*
parent
)
AdvancedSettingsWidget
::
AdvancedSettingsWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
),
:
QWidget
(
parent
),
...
@@ -29,7 +31,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QWidget* parent)
...
@@ -29,7 +31,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QWidget* parent)
{
{
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
updateAdvancedSettings
();
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// call settings
// call settings
connect
(
ui
->
checkBoxUntrusted
,
&
QAbstractButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
setCallsUntrusted
);
connect
(
ui
->
checkBoxUntrusted
,
&
QAbstractButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
setCallsUntrusted
);
...
@@ -75,12 +76,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QWidget* parent)
...
@@ -75,12 +76,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QWidget* parent)
connect
(
ui
->
videoDownPushButton
,
&
QPushButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
decreaseVideoCodecPriority
);
connect
(
ui
->
videoDownPushButton
,
&
QPushButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
decreaseVideoCodecPriority
);
connect
(
ui
->
videoUpPushButton
,
&
QPushButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
increaseVideoCodecPriority
);
connect
(
ui
->
videoUpPushButton
,
&
QPushButton
::
clicked
,
this
,
&
AdvancedSettingsWidget
::
increaseVideoCodecPriority
);
///////////////////////////////////////////////////////////////////////////////
ui
->
btnRingtone
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
Ringtone
.
ringtoneEnabled
);
ui
->
btnRingtone
->
setText
(
QFileInfo
(
QString
::
fromStdString
(
LRCInstance
::
getCurrAccConfig
().
Ringtone
.
ringtonePath
)).
fileName
());
ui
->
lineEditProxy
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
proxyEnabled
);
ui
->
lineEditSTUNAddress
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
STUN
.
enable
);
}
}
AdvancedSettingsWidget
::~
AdvancedSettingsWidget
()
AdvancedSettingsWidget
::~
AdvancedSettingsWidget
()
...
@@ -123,6 +118,11 @@ AdvancedSettingsWidget::updateAdvancedSettings()
...
@@ -123,6 +118,11 @@ AdvancedSettingsWidget::updateAdvancedSettings()
ui
->
videoCheckBox
->
setChecked
(
config
.
Video
.
videoEnabled
);
ui
->
videoCheckBox
->
setChecked
(
config
.
Video
.
videoEnabled
);
updateAudioCodecs
();
updateAudioCodecs
();
updateVideoCodecs
();
updateVideoCodecs
();
ui
->
btnRingtone
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
Ringtone
.
ringtoneEnabled
);
ui
->
btnRingtone
->
setText
(
QFileInfo
(
QString
::
fromStdString
(
LRCInstance
::
getCurrAccConfig
().
Ringtone
.
ringtonePath
)).
fileName
());
ui
->
lineEditProxy
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
proxyEnabled
);
ui
->
lineEditSTUNAddress
->
setEnabled
(
LRCInstance
::
getCurrAccConfig
().
STUN
.
enable
);
}
}
// call settings
// call settings
...
...
This diff is collapsed.
Click to expand it.
advancedsettingswidget.h
+
2
−
2
View file @
1da5a889
...
@@ -34,9 +34,10 @@ public:
...
@@ -34,9 +34,10 @@ public:
AdvancedSettingsWidget
(
QWidget
*
parent
=
nullptr
);
AdvancedSettingsWidget
(
QWidget
*
parent
=
nullptr
);
~
AdvancedSettingsWidget
();
~
AdvancedSettingsWidget
();
void
updateAdvancedSettings
();
private:
private:
Ui
::
AdvancedSettingsWidget
*
ui
;
Ui
::
AdvancedSettingsWidget
*
ui
;
void
updateAdvancedSettings
();
private
slots
:
private
slots
:
// call settings
// call settings
...
@@ -85,5 +86,4 @@ private slots:
...
@@ -85,5 +86,4 @@ private slots:
void
setVideoState
(
int
state
);
void
setVideoState
(
int
state
);
};
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
settingswidget.cpp
+
1
−
0
View file @
1da5a889
...
@@ -261,6 +261,7 @@ SettingsWidget::toggleAdvancedSettings()
...
@@ -261,6 +261,7 @@ SettingsWidget::toggleAdvancedSettings()
ui
->
advancedAccountSettingsPButton
->
setIcon
(
QPixmap
(
":/images/icons/round-arrow_drop_up-24px.svg"
));
ui
->
advancedAccountSettingsPButton
->
setIcon
(
QPixmap
(
":/images/icons/round-arrow_drop_up-24px.svg"
));
ui
->
scrollBarLabel
->
hide
();
ui
->
scrollBarLabel
->
hide
();
ui
->
advancedSettingsWidget
->
setVisible
(
true
);
ui
->
advancedSettingsWidget
->
setVisible
(
true
);
ui
->
advancedSettingsWidget
->
updateAdvancedSettings
();
QTimer
::
singleShot
(
50
,
this
,
QTimer
::
singleShot
(
50
,
this
,
[
this
]
{
[
this
]
{
auto
top
=
ui
->
advancedAccountSettingsPButton
->
frameGeometry
().
top
();
auto
top
=
ui
->
advancedAccountSettingsPButton
->
frameGeometry
().
top
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment