summaryrefslogtreecommitdiffstats
path: root/src/server/connectionframe/connectionframe.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-06-17 12:05:16 +0200
committerBjörn Hagemeister2014-06-17 12:05:16 +0200
commit8602764f8f069ec3cb6c8965262c016557bedb32 (patch)
tree6da131a729709c552068a9dc646d59ad81c77ac5 /src/server/connectionframe/connectionframe.cpp
parentFixed SegFauls by setting _streamingSource to integer and just using the clie... (diff)
downloadpvs2-8602764f8f069ec3cb6c8965262c016557bedb32.tar.gz
pvs2-8602764f8f069ec3cb6c8965262c016557bedb32.tar.xz
pvs2-8602764f8f069ec3cb6c8965262c016557bedb32.zip
Removed _tutorFrame and _selectedFrame out of MainWindow to prevent possible SegFaults because of too many Pointers to ConnectionFrames.
Wrote to getters getTutorFrame() and getSelectedFrame(), which are just iterating over ConnectionFrames and looking for flags _isTutor and _isSelected.
Diffstat (limited to 'src/server/connectionframe/connectionframe.cpp')
-rw-r--r--src/server/connectionframe/connectionframe.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp
index b09139c..caf99fc 100644
--- a/src/server/connectionframe/connectionframe.cpp
+++ b/src/server/connectionframe/connectionframe.cpp
@@ -50,7 +50,7 @@ static QIcon *term = NULL, *cam = NULL, *eye = NULL, *lock = NULL;
* @param height
*/
ConnectionFrame::ConnectionFrame(QWidget *parent, int width, int height) :
- QGroupBox(parent), _client(NULL), _timerId(0), _timerCounter(0), _selected(false), _isTutor(false)
+ QGroupBox(parent), _client(NULL), _timerId(0), _timerCounter(0), _isSelected(false), _isTutor(false)
{
//defines the ui-stuff
@@ -295,9 +295,9 @@ void ConnectionFrame::timerEvent(QTimerEvent* event)
*/
void ConnectionFrame::setSelection(bool selected)
{
- if (_selected == selected)
+ if (_isSelected == selected)
return;
- _selected = selected;
+ _isSelected = selected;
this->updateAppearance();
}
@@ -322,7 +322,7 @@ void ConnectionFrame::updateAppearance()
if (_client == NULL)
{
// Unconnected Frame
- if (_selected)
+ if (_isSelected)
this->setStyleSheet(style_selectedStudent);
else
this->setStyleSheet(style_disconnected);
@@ -336,13 +336,13 @@ void ConnectionFrame::updateAppearance()
// Normal client, no special stuff active
- if (_selected && _isTutor){
+ if (_isSelected && _isTutor){
this->setStyleSheet(style_selectedTutor);
}
else if (_isTutor){
this->setStyleSheet(style_tutor);
}
- else if (_selected){
+ else if (_isSelected){
this->setStyleSheet(style_selectedStudent);
}