Skip to content

Commit b48407d

Browse files
committed
continue fixing Mac build errors
1 parent 2be37fa commit b48407d

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

src/third_party/mimetypes-qt4/io/qstandardpaths_mac.cpp

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@
4141

4242
#include "qstandardpaths.h"
4343
#include <QtCore/qdir.h>
44-
#include <QtCore/QVarLengthArray>
45-
//#include <private/qcore_mac_p.h>
44+
4645

4746
#ifndef QT_BOOTSTRAPPED
4847
#include <QtCore/qcoreapplication.h>
4948
#endif
5049

5150
#include <ApplicationServices/ApplicationServices.h>
52-
#include <CoreFoundation/CoreFoundation.h>
5351

5452
QT_BEGIN_NAMESPACE
5553

@@ -189,38 +187,4 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
189187
return dirs;
190188
}
191189

192-
QString _toQString(CFStringRef str)
193-
{
194-
if(!str)
195-
return QString();
196-
CFIndex length = CFStringGetLength(str);
197-
const UniChar *chars = CFStringGetCharactersPtr(str);
198-
if (chars)
199-
return QString(reinterpret_cast<const QChar *>(chars), length);
200-
201-
QVarLengthArray<UniChar> buffer(length);
202-
CFStringGetCharacters(str, CFRangeMake(0, length), buffer.data());
203-
return QString(reinterpret_cast<const QChar *>(buffer.constData()), length);
204-
}
205-
206-
#ifndef QT_BOOTSTRAPPED
207-
QString QStandardPaths::displayName(StandardLocation type)
208-
{
209-
if (QStandardPaths::HomeLocation == type)
210-
return QCoreApplication::translate("QStandardPaths", "Home");
211-
212-
FSRef ref;
213-
OSErr err = FSFindFolder(kOnAppropriateDisk, translateLocation(type), false, &ref);
214-
if (err)
215-
return QString();
216-
217-
CFString displayName;
218-
err = LSCopyDisplayNameForRef(&ref, &displayName);
219-
if (err)
220-
return QString();
221-
222-
return _toQString(displayName);
223-
}
224-
#endif
225-
226190
QT_END_NAMESPACE

0 commit comments

Comments
 (0)