Fix spelling of converter
Primarily in the Cocoa clipboard code. Change-Id: I39fede6144be5a0007a94e2ac2464892c958732f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
b8b675014f
commit
0bd46cc062
@ -45,7 +45,7 @@ Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale
|
|||||||
* class QOutlineMapper
|
* class QOutlineMapper
|
||||||
*
|
*
|
||||||
* Used to map between QPainterPath and the QT_FT_Outline structure used by the
|
* Used to map between QPainterPath and the QT_FT_Outline structure used by the
|
||||||
* freetype scanconvertor.
|
* freetype scanconverter.
|
||||||
*
|
*
|
||||||
* The outline mapper uses a path iterator to get points from the path,
|
* The outline mapper uses a path iterator to get points from the path,
|
||||||
* so that it is possible to transform the points as they are converted. The
|
* so that it is possible to transform the points as they are converted. The
|
||||||
|
@ -793,7 +793,7 @@ void registerBuiltInTypes()
|
|||||||
/*
|
/*
|
||||||
\fn bool QMacPasteboardMime::canConvert(const QString &mime, QString flav)
|
\fn bool QMacPasteboardMime::canConvert(const QString &mime, QString flav)
|
||||||
|
|
||||||
Returns \c true if the convertor can convert (both ways) between
|
Returns \c true if the converter can convert (both ways) between
|
||||||
\a mime and \a flav; otherwise returns \c false.
|
\a mime and \a flav; otherwise returns \c false.
|
||||||
|
|
||||||
All subclasses must reimplement this pure virtual function.
|
All subclasses must reimplement this pure virtual function.
|
||||||
@ -803,7 +803,7 @@ void registerBuiltInTypes()
|
|||||||
\fn QString QMacPasteboardMime::mimeFor(QString flav)
|
\fn QString QMacPasteboardMime::mimeFor(QString flav)
|
||||||
|
|
||||||
Returns the MIME UTI used for Mac flavor \a flav, or 0 if this
|
Returns the MIME UTI used for Mac flavor \a flav, or 0 if this
|
||||||
convertor does not support \a flav.
|
converter does not support \a flav.
|
||||||
|
|
||||||
All subclasses must reimplement this pure virtual function.
|
All subclasses must reimplement this pure virtual function.
|
||||||
*/
|
*/
|
||||||
@ -812,7 +812,7 @@ void registerBuiltInTypes()
|
|||||||
\fn QString QMacPasteboardMime::flavorFor(const QString &mime)
|
\fn QString QMacPasteboardMime::flavorFor(const QString &mime)
|
||||||
|
|
||||||
Returns the Mac UTI used for MIME type \a mime, or 0 if this
|
Returns the Mac UTI used for MIME type \a mime, or 0 if this
|
||||||
convertor does not support \a mime.
|
converter does not support \a mime.
|
||||||
|
|
||||||
All subclasses must reimplement this pure virtual function.
|
All subclasses must reimplement this pure virtual function.
|
||||||
*/
|
*/
|
||||||
|
@ -19,14 +19,14 @@ public:
|
|||||||
enum DataRequestType { EagerRequest, LazyRequest };
|
enum DataRequestType { EagerRequest, LazyRequest };
|
||||||
private:
|
private:
|
||||||
struct Promise {
|
struct Promise {
|
||||||
Promise() : itemId(0), convertor(nullptr) { }
|
Promise() : itemId(0), converter(nullptr) { }
|
||||||
|
|
||||||
static Promise eagerPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
|
static Promise eagerPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
|
||||||
static Promise lazyPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
|
static Promise lazyPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
|
||||||
Promise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *md, int o, DataRequestType drt);
|
Promise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *md, int o, DataRequestType drt);
|
||||||
|
|
||||||
int itemId, offset;
|
int itemId, offset;
|
||||||
QMacInternalPasteboardMime *convertor;
|
QMacInternalPasteboardMime *converter;
|
||||||
QString mime;
|
QString mime;
|
||||||
QPointer<QMacMimeData> mimeData;
|
QPointer<QMacMimeData> mimeData;
|
||||||
QVariant variantData;
|
QVariant variantData;
|
||||||
|
@ -55,7 +55,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
QMacPasteboard::Promise::Promise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *md, int o, DataRequestType drt)
|
QMacPasteboard::Promise::Promise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *md, int o, DataRequestType drt)
|
||||||
: itemId(itemId), offset(o), convertor(c), mime(m), dataRequestType(drt)
|
: itemId(itemId), offset(o), converter(c), mime(m), dataRequestType(drt)
|
||||||
{
|
{
|
||||||
// Request the data from the application immediately for eager requests.
|
// Request the data from the application immediately for eager requests.
|
||||||
if (dataRequestType == QMacPasteboard::EagerRequest) {
|
if (dataRequestType == QMacPasteboard::EagerRequest) {
|
||||||
@ -137,7 +137,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
|
|||||||
QMacPasteboard::Promise promise;
|
QMacPasteboard::Promise promise;
|
||||||
for (int i = 0; i < qpaste->promises.size(); i++){
|
for (int i = 0; i < qpaste->promises.size(); i++){
|
||||||
QMacPasteboard::Promise tmp = qpaste->promises[i];
|
QMacPasteboard::Promise tmp = qpaste->promises[i];
|
||||||
if (!availableConverters.contains(tmp.convertor)) {
|
if (!availableConverters.contains(tmp.converter)) {
|
||||||
// promise.converter is a pointer initialized by the value found
|
// promise.converter is a pointer initialized by the value found
|
||||||
// in QMacInternalPasteboardMime's global list of QMacInternalPasteboardMimes.
|
// in QMacInternalPasteboardMime's global list of QMacInternalPasteboardMimes.
|
||||||
// We add pointers to this list in QMacInternalPasteboardMime's ctor;
|
// We add pointers to this list in QMacInternalPasteboardMime's ctor;
|
||||||
@ -147,7 +147,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp.itemId == promise_id && tmp.convertor->canConvert(tmp.mime, flavorAsQString)){
|
if (tmp.itemId == promise_id && tmp.converter->canConvert(tmp.mime, flavorAsQString)){
|
||||||
promise = tmp;
|
promise = tmp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
|
|||||||
promiseData = promise.variantData;
|
promiseData = promise.variantData;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QByteArray> md = promise.convertor->convertFromMime(promise.mime, promiseData, flavorAsQString);
|
QList<QByteArray> md = promise.converter->convertFromMime(promise.mime, promiseData, flavorAsQString);
|
||||||
if (md.size() <= promise.offset)
|
if (md.size() <= promise.offset)
|
||||||
return cantGetFlavorErr;
|
return cantGetFlavorErr;
|
||||||
const QByteArray &ba = md[promise.offset];
|
const QByteArray &ba = md[promise.offset];
|
||||||
|
Loading…
Reference in New Issue
Block a user