forked from qt-creator/qt-creator
Reduce usage of qApp in favor of static function calls
Q*Application classes have unusually many static functions. In many cases in our code, these functions are unnecessarily called as instance functions, using the qApp helper. This patch replaces many occurencies of qApp with the according Q*Application classname. Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -68,7 +68,7 @@ class FileIconProviderImplementation : public QFileIconProvider
|
||||
{
|
||||
public:
|
||||
FileIconProviderImplementation()
|
||||
: m_unknownFileIcon(qApp->style()->standardIcon(QStyle::SP_FileIcon))
|
||||
: m_unknownFileIcon(QApplication::style()->standardIcon(QStyle::SP_FileIcon))
|
||||
{}
|
||||
|
||||
QIcon icon(const QFileInfo &info) const override;
|
||||
@@ -184,7 +184,7 @@ QPixmap overlayIcon(const QPixmap &baseIcon, const QIcon &overlayIcon)
|
||||
*/
|
||||
QPixmap overlayIcon(QStyle::StandardPixmap baseIcon, const QIcon &overlay, const QSize &size)
|
||||
{
|
||||
return overlayIcon(qApp->style()->standardIcon(baseIcon).pixmap(size), overlay);
|
||||
return overlayIcon(QApplication::style()->standardIcon(baseIcon).pixmap(size), overlay);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user