summaryrefslogtreecommitdiff
path: root/utils/regtools/qeditor/regedit.cpp
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-09-27 13:28:44 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2014-12-15 22:52:35 +0100
commit3b4e63173d5f762a368d159e21f76e2df3fcf8ab (patch)
tree286fcb801ec69ae20e67a00229403310e7de886b /utils/regtools/qeditor/regedit.cpp
parentfe1fed88732ac84f5a4196c5936c99e9750a6525 (diff)
downloadrockbox-3b4e63173d5f762a368d159e21f76e2df3fcf8ab.tar.gz
rockbox-3b4e63173d5f762a368d159e21f76e2df3fcf8ab.zip
qeditor: rework mainwindow tab names handling
With the previous code, tab names would be ignored if tab is detached which can happen early on. Change-Id: I9eac4202850f3e79a04590a4ba1444850ec6a583 Reviewed-on: http://gerrit.rockbox.org/986 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'utils/regtools/qeditor/regedit.cpp')
-rw-r--r--utils/regtools/qeditor/regedit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/regtools/qeditor/regedit.cpp b/utils/regtools/qeditor/regedit.cpp
index b1f9afd45c..5a32defb58 100644
--- a/utils/regtools/qeditor/regedit.cpp
+++ b/utils/regtools/qeditor/regedit.cpp
@@ -961,6 +961,7 @@ RegEdit::RegEdit(Backend *backend, QWidget *parent)
961 SetModified(false, false); 961 SetModified(false, false);
962 m_right_panel = 0; 962 m_right_panel = 0;
963 SetPanel(new EmptyEditPanel(this)); 963 SetPanel(new EmptyEditPanel(this));
964 UpdateTabName();
964 965
965 connect(m_file_open, SIGNAL(clicked()), this, SLOT(OnOpen())); 966 connect(m_file_open, SIGNAL(clicked()), this, SLOT(OnOpen()));
966 connect(m_file_save, SIGNAL(clicked()), this, SLOT(OnSave())); 967 connect(m_file_save, SIGNAL(clicked()), this, SLOT(OnSave()));
@@ -1080,7 +1081,10 @@ bool RegEdit::SaveSocFile(const QString& filename)
1080void RegEdit::UpdateTabName() 1081void RegEdit::UpdateTabName()
1081{ 1082{
1082 QFileInfo info(m_cur_socfile.GetFilename()); 1083 QFileInfo info(m_cur_socfile.GetFilename());
1083 SetTabName(info.fileName()); 1084 if(info.exists())
1085 SetTabName(info.fileName());
1086 else
1087 SetTabName("Register Editor");
1084} 1088}
1085 1089
1086void RegEdit::LoadSocFile(const QString& filename) 1090void RegEdit::LoadSocFile(const QString& filename)