summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl_mac.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-05-02 19:42:27 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-05-19 11:20:36 +0000
commitb88573e29b1a7e5201dab7d894df41bb5ebe6c37 (patch)
tree58a4b0a89dc4316533f65ad0ef6935feeffff08c /src/corelib/io/qurl_mac.mm
parent0d5b2422ce278a2fc7d99b7f1a9b10f5d90b8c58 (diff)
Collate conversion functions for Core Foundation/Foundation types
Makes it easier to apply similar changes across all related functions, and to implement functions for new types by having the previous approaches available in one place. Change-Id: I3f0590d67d0e6deb1c6c856ab1de96b55b6af058 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/corelib/io/qurl_mac.mm')
-rw-r--r--src/corelib/io/qurl_mac.mm97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/corelib/io/qurl_mac.mm b/src/corelib/io/qurl_mac.mm
deleted file mode 100644
index 89c1b50b31..0000000000
--- a/src/corelib/io/qurl_mac.mm
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qurl.h"
-
-#ifdef Q_OS_MAC
-#include <Foundation/Foundation.h>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-/*! \fn QUrl QUrl::fromCFURL(CFURLRef url)
- \since 5.2
-
- Constructs a QUrl containing a copy of the CFURL \a url.
-*/
-QUrl QUrl::fromCFURL(CFURLRef url)
-{
- return QUrl(QString::fromCFString(CFURLGetString(url)));
-}
-
-/*! \fn CFURLRef QUrl::toCFURL() const
- \since 5.2
-
- Creates a CFURL from a QUrl. The caller owns the CFURL and is
- responsible for releasing it.
-*/
-CFURLRef QUrl::toCFURL() const
-{
- CFURLRef url = 0;
- CFStringRef str = toString(FullyEncoded).toCFString();
- if (str) {
- url = CFURLCreateWithString(0, str, 0);
- CFRelease(str);
- }
- return url;
-}
-
-/*!
- \fn QUrl QUrl::fromNSURL(const NSURL *url)
- \since 5.2
-
- Constructs a QUrl containing a copy of the NSURL \a url.
-*/
-QUrl QUrl::fromNSURL(const NSURL *url)
-{
- return QUrl(QString::fromNSString([url absoluteString]));
-}
-
-/*!
- \fn NSURL* QUrl::toNSURL() const
- \since 5.2
-
- Creates a NSURL from a QUrl. The NSURL is autoreleased.
-*/
-NSURL *QUrl::toNSURL() const
-{
- return [NSURL URLWithString:toString(FullyEncoded).toNSString()];
-}
-
-QT_END_NAMESPACE