D29809: Don't invoke qstring localized stuff in critical section

David Faure noreply at phabricator.kde.org
Wed May 27 22:12:44 BST 2020


dfaure added a comment.


  Makes sense; just two minor things.

INLINE COMMENTS

> kcrash.cpp:95
> +#ifdef Q_OS_LINUX
> +QByteArray socketpath;
> +#endif

prepend `static`, it's only used in this file.

> kcrash.cpp:662
>  
> -        // Create socket path to transfer ptrace scope and open connection
> -        const QByteArray socketpath = QFile::encodeName(
> -            QStringLiteral("%1/kcrash_%2").arg(QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation))
> -                                          .arg(getpid()));
> +        using KCrash::socketpath;
>          int sockfd = openDrKonqiSocket(socketpath);

It would be more consistent with the other global vars to name it `s_socketpath`
(and outside the KCrash namespace)

REPOSITORY
  R285 KCrash

REVISION DETAIL
  https://phabricator.kde.org/D29809

To: jpalecek, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200527/a540d760/attachment.htm>


More information about the Kde-frameworks-devel mailing list