Skip to content

Commit

Permalink
fix: Fixed the issue where the clipboard may have no color value afte…
Browse files Browse the repository at this point in the history
…r absorbing color

  The color absorber delays exiting by 100ms so that the color values ​​can be stored in the clipboard normally.

Log: Fixed the issue where the clipboard may have no color value after absorbing color
Bug: https://pms.uniontech.com/bug-view-237007.html
  • Loading branch information
starhcq committed Feb 22, 2024
1 parent 6adc718 commit 6926708
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void Clipboard::copyToClipboard(QColor color, QString colorType)
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(colorString);

// Quit application.
QApplication::quit();
// Quit application. Delay exit by 100ms so that the color value can be stored in the clipboard normally
QTimer::singleShot(100, this,[=](){
QApplication::quit();
});
}

0 comments on commit 6926708

Please sign in to comment.