Skip to content

Commit

Permalink
Fix the issue of inconsistent new session names in different situations
Browse files Browse the repository at this point in the history
#45

Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Aug 25, 2024
1 parent 2a4b29c commit d2a1f15
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ en-US:
- Fix the issue that the SSH connection cannot be reconnected by tapping the Enter key in some cases
- Fix the issue that the target session object is inaccurate when locking/unlocking the session
- Fix the issue that some functions in the context menu of the floating window cannot be used
- Fix the issue of inconsistent new session names in different situations [#45](https://github.com/QQxiaoming/quardCRT/issues/45)
- Update pre-built plugin [timestamp](https://github.com/QuardCRT-platform/plugin-timestamp) to V0.0.3

zh-CN:
Expand All @@ -32,6 +33,7 @@ zh-CN:
- 修复ssh连接部分情况下无法通过敲击回车键发起重连的问题
- 修复锁定/解锁会话时目标会话对象不准确
- 修复浮动窗口上下文菜单中部分功能无法使用的问题
- 修复不同情况下新建会话名称不一致问题 [#45](https://github.com/QQxiaoming/quardCRT/issues/45)
- 更新预构建插件[timestamp](https://github.com/QuardCRT-platform/plugin-timestamp)到V0.0.3版本,更新预构建插件CharacterCode到V0.0.4版本

## [[V0.4.8](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.4.8)] - 2024-07-26
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Fix the issue that the SSH connection cannot be reconnected by tapping the Enter key in some cases
- Fix the issue that the target session object is inaccurate when locking/unlocking the session
- Fix the issue that some functions in the context menu of the floating window cannot be used
- Fix the issue of inconsistent new session names in different situations [#45](https://github.com/QQxiaoming/quardCRT/issues/45)
- Update pre-built plugin [timestamp](https://github.com/QuardCRT-platform/plugin-timestamp) to V0.0.3

## [[V0.4.8](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.4.8)] - 2024-07-26
Expand Down
18 changes: 16 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4293,7 +4293,7 @@ QString CentralWidget::startSSH2Session(MainWidgetGroup *group, int groupIndex,
int index = group->sessionTab->addTab(groupIndex,sessionsWindow->getMainWidget(), sessionsWindow->getTitle());
connectSessionStateChange(group->sessionTab,index,sessionsWindow);
if(name.isEmpty()) {
name = "SSH2";
name = hostname;
checkSessionName(name);
}
sessionsWindow->setName(name);
Expand Down Expand Up @@ -4334,7 +4334,7 @@ QString CentralWidget::startVNCSession(MainWidgetGroup *group, int groupIndex, Q
int index = group->sessionTab->addTab(groupIndex,sessionsWindow->getMainWidget(), sessionsWindow->getTitle());
connectSessionStateChange(group->sessionTab,index,sessionsWindow);
if(name.isEmpty()) {
name = "VNC";
name = hostname;
checkSessionName(name);
}
sessionsWindow->setName(name);
Expand All @@ -4351,6 +4351,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = data.TelnetData.hostname;
if(data.openInTab) {
name = startTelnetSession(group,groupIndex,name,data.TelnetData.port,type);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4363,6 +4365,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
data.SerialData.dataBits,data.SerialData.parity,
data.SerialData.stopBits,data.SerialData.flowControl,
data.SerialData.xEnable);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4371,6 +4375,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = "Local Shell";
if(data.openInTab) {
name = startLocalShellSession(group,groupIndex,data.LocalShellData.command,globalOptionsWindow->getNewTabWorkPath());
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4379,6 +4385,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = data.RawData.hostname;
if(data.openInTab) {
name = startRawSocketSession(group,groupIndex,name,data.RawData.port);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4387,6 +4395,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = data.NamePipeData.pipeName;
if(data.openInTab) {
name = startNamePipeSession(group,groupIndex,name);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4395,6 +4405,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = data.SSH2Data.hostname;
if(data.openInTab) {
name = startSSH2Session(group,groupIndex,name,data.SSH2Data.port,data.SSH2Data.username,data.SSH2Data.password);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand All @@ -4403,6 +4415,8 @@ void CentralWidget::startSession(MainWidgetGroup *group, int groupIndex, QuickCo
QString name = data.VNCData.hostname;
if(data.openInTab) {
name = startVNCSession(group,groupIndex,name,data.VNCData.port,data.VNCData.password);
} else {
checkSessionName(name);
}
if(data.saveSession) {
addSessionToSessionManager(data,name, !data.openInTab);
Expand Down

0 comments on commit d2a1f15

Please sign in to comment.