Skip to content

Commit

Permalink
2024年8月らじる仕様変更対応
Browse files Browse the repository at this point in the history
  • Loading branch information
CSReviser committed Aug 18, 2024
1 parent f91328a commit da74df5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ MainWindow::~MainWindow() {
downloadThread->terminate();
delete downloadThread;
}
if ( !Utility::nogui() && no_write_ini == "yes" )
bool nogui_flag = Utility::nogui();
if ( !nogui_flag && no_write_ini == "yes" )
settings( WriteMode );
delete ui;
}
Expand Down Expand Up @@ -656,7 +657,9 @@ void MainWindow::finished() {
ui->downloadButton->setEnabled( true );
}
//ui->label->setText( "" );
if ( Utility::nogui() )
// if ( Utility::nogui() )
bool nogui_flag = Utility::nogui();
if ( nogui_flag )
QCoreApplication::exit();
}

Expand Down
8 changes: 6 additions & 2 deletions messagewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,19 @@ QString MessageWindow::text() {

// 改行あり
void MessageWindow::appendParagraph( const QString& text ) {
if ( !Utility::nogui() ) {
bool nogui_flag = Utility::nogui();
if ( !nogui_flag ) {
// if ( !Utility::nogui() ) {
show();
textEdit->appendPlainText( text );
}
}

// 改行なし
void MessageWindow::append( const QString& text ) {
if ( !Utility::nogui() ) {
bool nogui_flag = Utility::nogui();
if ( !nogui_flag ) {
// if ( !Utility::nogui() ) {
show();
//textEdit->setPlainText( textEdit->toPlainText().append( text ) ); // これはとても遅い
QTextCursor cursor = textEdit->textCursor();
Expand Down

0 comments on commit da74df5

Please sign in to comment.