summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qfiledialog_p.h')
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 12b2b9a755..a66ee757f6 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -143,25 +143,7 @@ public:
QLineEdit *lineEdit() const;
- int maxNameLength(const QString &path) {
-#if defined(Q_OS_UNIX)
- return ::pathconf(QFile::encodeName(path).data(), _PC_NAME_MAX);
-#elif defined(Q_OS_WIN)
-#ifndef Q_OS_WINCE
- DWORD maxLength;
- QString drive = path.left(3);
- if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == FALSE)
- return -1;
- return maxLength;
-#else
- Q_UNUSED(path);
- return MAX_PATH;
-#endif //Q_OS_WINCE
-#else
- Q_UNUSED(path);
-#endif
- return -1;
- }
+ static int maxNameLength(const QString &path);
QString basename(const QString &path) const
{