添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account ➜ ~ flameshot
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid

Expected behavior
Willing to take screenshot

System Information
OS: Manjaro Linux x86_64
Kernel: 5.4.34-1-MANJARO

For some reason std::locale::global(std::locale("")) is failing on KDE.
Putting it in try and catching runtime_error will make it use default c locale.
This would fix this issue, but I didn't found in codebase other method of handling errors then popup windows. It would be at lest inconvenient to close window that says "Blah blah - switching to default locale" every time when you try to save screenshot.

FileNameHandler::FileNameHandler(QObject *parent) : QObject(parent) {
        std::locale::global(std::locale(""));
    }catch(const std::runtime_error &e){
          

@tomatic @samiurprapon
Solution that doesn't require building application by yourself would be to uncheck "Detailed Settings" in System Settings->Regional Settings->Formats
Formats setting screenshot