Unindent contents of anonymous namespaces
No real changes, only formatting.
This commit is contained in:
@@ -17,8 +17,9 @@
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
wxString DataFormatIdToMimeType(wxDataFormatId formatId)
|
|
||||||
{
|
wxString DataFormatIdToMimeType(wxDataFormatId formatId)
|
||||||
|
{
|
||||||
switch ( formatId )
|
switch ( formatId )
|
||||||
{
|
{
|
||||||
case wxDF_TEXT: return "text/plain";
|
case wxDF_TEXT: return "text/plain";
|
||||||
@@ -44,9 +45,10 @@ namespace
|
|||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
wxDataFormat::wxDataFormat(wxDataFormatId formatId)
|
wxDataFormat::wxDataFormat(wxDataFormatId formatId)
|
||||||
{
|
{
|
||||||
SetType(formatId);
|
SetType(formatId);
|
||||||
|
@@ -23,8 +23,9 @@
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
wxDragResult DropActionToDragResult(Qt::DropAction action)
|
|
||||||
{
|
wxDragResult DropActionToDragResult(Qt::DropAction action)
|
||||||
|
{
|
||||||
switch ( action )
|
switch ( action )
|
||||||
{
|
{
|
||||||
case Qt::IgnoreAction:
|
case Qt::IgnoreAction:
|
||||||
@@ -40,10 +41,10 @@ namespace
|
|||||||
|
|
||||||
wxFAIL_MSG("Illegal drop action");
|
wxFAIL_MSG("Illegal drop action");
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::DropAction DragResultToDropAction(wxDragResult result)
|
Qt::DropAction DragResultToDropAction(wxDragResult result)
|
||||||
{
|
{
|
||||||
switch ( result )
|
switch ( result )
|
||||||
{
|
{
|
||||||
case wxDragCopy:
|
case wxDragCopy:
|
||||||
@@ -60,22 +61,22 @@ namespace
|
|||||||
|
|
||||||
wxFAIL_MSG("Illegal drag result");
|
wxFAIL_MSG("Illegal drag result");
|
||||||
return Qt::IgnoreAction;
|
return Qt::IgnoreAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDataFormat(wxDataObject* dataObject,
|
void AddDataFormat(wxDataObject* dataObject,
|
||||||
QMimeData* mimeData,
|
QMimeData* mimeData,
|
||||||
const wxDataFormat& format)
|
const wxDataFormat& format)
|
||||||
{
|
{
|
||||||
const size_t data_size = dataObject->GetDataSize(format);
|
const size_t data_size = dataObject->GetDataSize(format);
|
||||||
|
|
||||||
QByteArray data(static_cast<int>(data_size), Qt::Initialization());
|
QByteArray data(static_cast<int>(data_size), Qt::Initialization());
|
||||||
dataObject->GetDataHere(format, data.data());
|
dataObject->GetDataHere(format, data.data());
|
||||||
|
|
||||||
mimeData->setData(wxQtConvertString(format.GetMimeType()), data);
|
mimeData->setData(wxQtConvertString(format.GetMimeType()), data);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMimeData* CreateMimeData(wxDataObject* dataObject)
|
QMimeData* CreateMimeData(wxDataObject* dataObject)
|
||||||
{
|
{
|
||||||
QMimeData* mimeData = new QMimeData();
|
QMimeData* mimeData = new QMimeData();
|
||||||
|
|
||||||
const size_t count = dataObject->GetFormatCount();
|
const size_t count = dataObject->GetFormatCount();
|
||||||
@@ -89,19 +90,19 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
return mimeData;
|
return mimeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDragCursor(QDrag& drag,
|
void SetDragCursor(QDrag& drag,
|
||||||
const wxCursor& cursor,
|
const wxCursor& cursor,
|
||||||
Qt::DropAction action)
|
Qt::DropAction action)
|
||||||
{
|
{
|
||||||
if ( cursor.IsOk() )
|
if ( cursor.IsOk() )
|
||||||
drag.setDragCursor(cursor.GetHandle().pixmap(), action);
|
drag.setDragCursor(cursor.GetHandle().pixmap(), action);
|
||||||
}
|
}
|
||||||
|
|
||||||
class PendingMimeDataSetter
|
class PendingMimeDataSetter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PendingMimeDataSetter(const QMimeData*& targetMimeData,
|
PendingMimeDataSetter(const QMimeData*& targetMimeData,
|
||||||
const QMimeData* mimeData)
|
const QMimeData* mimeData)
|
||||||
: m_targetMimeData(targetMimeData)
|
: m_targetMimeData(targetMimeData)
|
||||||
@@ -114,10 +115,11 @@ namespace
|
|||||||
m_targetMimeData = NULL;
|
m_targetMimeData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QMimeData*& m_targetMimeData;
|
const QMimeData*& m_targetMimeData;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
class wxDropTarget::Impl : public QObject
|
class wxDropTarget::Impl : public QObject
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user