Skip to content

Commit

Permalink
Windows QPA: Extend the debug operator for IShellItem
Browse files Browse the repository at this point in the history
Output URL string and file system name, too.

Task-number: QTBUG-67932
Change-Id: Ic5d1927d70d98f7c081bee06af85b9f3a2a09812
Reviewed-by: Andre de la Rocha <[email protected]>
  • Loading branch information
FriedemannKleint authored and liangqi committed Nov 11, 2018
1 parent b20c15f commit 59a0902
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ class QWindowsShellItem
SFGAOF attributes() const { return m_attributes; }
QString normalDisplay() const // base name, usually
{ return displayName(m_item, SIGDN_NORMALDISPLAY); }
QString urlString() const
{ return displayName(m_item, SIGDN_URL); }
QString fileSysPath() const
{ return displayName(m_item, SIGDN_FILESYSPATH); }
QString desktopAbsoluteParsing() const
{ return displayName(m_item, SIGDN_DESKTOPABSOLUTEPARSING); }
QString path() const; // Only set for 'FileSystem' (SFGAO_FILESYSTEM) items
Expand Down Expand Up @@ -734,7 +738,8 @@ void QWindowsShellItem::format(QDebug &d) const
if (canCopy())
d << " [copyable]";
d << ", normalDisplay=\"" << normalDisplay()
<< "\", desktopAbsoluteParsing=\"" << desktopAbsoluteParsing() << '"';
<< "\", desktopAbsoluteParsing=\"" << desktopAbsoluteParsing()
<< "\", urlString=\"" << urlString() << "\", fileSysPath=\"" << fileSysPath() << '"';
const QString pathS = path();
if (!pathS.isEmpty())
d << ", path=\"" << pathS << '"';
Expand Down

0 comments on commit 59a0902

Please sign in to comment.