Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dtk
dtk
Commits
f5ee8d25
Commit
f5ee8d25
authored
Jul 30, 2014
by
NICLAUSSE Nicolas
Browse files
Merge branch 'master' of github.com:d-tk/dtk
parents
ebc4e15e
d9ca2bb3
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
src/dtkCore/dtkArray.h
View file @
f5ee8d25
This diff is collapsed.
Click to expand it.
src/dtkCore/dtkArrayData.cpp
View file @
f5ee8d25
...
...
@@ -42,7 +42,7 @@ void dtkRoundUpNextPowerOfTwo(quint64& nalloc)
qintptr
dtkAllocMore
(
qintptr
alloc
,
qintptr
extra
)
{
Q_ASSERT
(
alloc
>=
0
&&
extra
>=
0
);
Q_ASSERT_X
(
alloc
<
(
1
<<
62
)
-
extra
,
"dtkAllocMore"
,
"Requested size is too large!"
);
Q_ASSERT_X
(
alloc
<
(
1
ll
<<
62
)
-
extra
,
"dtkAllocMore"
,
"Requested size is too large!"
);
quint64
nalloc
=
alloc
+
extra
;
...
...
src/dtkCore/dtkArrayData.h
View file @
f5ee8d25
...
...
@@ -141,7 +141,6 @@ inline dtkArrayData::AllocationOptions dtkArrayData::cloneFlags(void) const
return
result
;
}
// /////////////////////////////////////////////////////////////////
//
// /////////////////////////////////////////////////////////////////
...
...
@@ -283,7 +282,7 @@ template <typename T> inline dtkTypedArrayData<T> *dtkTypedArrayData<T>::fromRaw
template
<
typename
T
>
inline
dtkTypedArrayData
<
T
>
*
dtkTypedArrayData
<
T
>::
sharedNull
(
void
)
{
Q_STATIC_ASSERT
(
sizeof
(
dtkTypedArrayData
)
==
sizeof
(
Q
ArrayData
));
Q_STATIC_ASSERT
(
sizeof
(
dtkTypedArrayData
)
==
sizeof
(
dtk
ArrayData
));
return
static_cast
<
dtkTypedArrayData
*>
(
dtkArrayData
::
sharedNull
());
}
...
...
@@ -300,7 +299,7 @@ template <typename T> inline dtkTypedArrayData<T> *dtkTypedArrayData<T>::unshara
Q_STATIC_ASSERT
(
sizeof
(
dtkTypedArrayData
)
==
sizeof
(
dtkArrayData
));
return
allocate
(
/* capacity */
0
,
Unsharable
);
}
}
//
// dtkArrayData.h ends here
src/dtkGuiSupport/dtkSearchField.mm
View file @
f5ee8d25
/* dtkSearchField.mm ---
*
/* dtkSearchField.mm ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed Mar 21 23:47:10 2012 (+0100)
...
...
@@ -9,12 +9,12 @@
* Update #: 11
*/
/* Commentary:
*
/* Commentary:
*
*/
/* Change log:
*
*
*/
#include
"dtkSearchField.h"
...
...
@@ -28,7 +28,7 @@
#include
<QtWidgets/QMacCocoaViewContainer>
// /////////////////////////////////////////////////////////////////
//
//
// /////////////////////////////////////////////////////////////////
static
inline
NSString
*
fromQString
(
const
QString
&
string
)
...
...
@@ -45,22 +45,16 @@ static inline QString toQString(NSString *string)
return
QString
::
fromUtf8
([
string
UTF8String
]);
}
static
inline
NSImage
*
fromQPixmap
(
const
QPixmap
&
pixmap
)
{
CGImageRef
cgImage
=
pixmap
.
toMacCGImageRef
();
return
[[
NSImage
alloc
]
initWithCGImage
:
cgImage
size
:
NSZeroSize
];
}
static
inline
void
setupLayout
(
void
*
cocoaView
,
QWidget
*
parent
)
{
parent
->
setAttribute
(
Qt
::
WA_NativeWindow
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
parent
);
layout
->
setMargin
(
0
);
layout
->
addWidget
(
new
QMacCocoaViewContainer
(
cocoaView
,
parent
));
layout
->
addWidget
(
new
QMacCocoaViewContainer
(
(
NSView
*
)
cocoaView
,
parent
));
}
// /////////////////////////////////////////////////////////////////
//
//
// /////////////////////////////////////////////////////////////////
class
dtkSearchFieldPrivate
:
public
QObject
...
...
tst/dtkCore/dtkArrayTest.cpp
View file @
f5ee8d25
This diff is collapsed.
Click to expand it.
tst/dtkCore/dtkArrayTest.h
View file @
f5ee8d25
...
...
@@ -26,30 +26,30 @@ private slots:
private
slots
:
void
testCreate
(
void
);
void
testCopyAndAssignement
(
void
);
void
testAppend
(
void
);
/* void testAppendTwoAtATime(void); */
/* void testAppendThreeAtATime(void); */
/* void testAppendFourAtATime(void); */
/* void testAppendArray(void); */
/* void testSetAt(void); */
/* void testValue(void); */
/* void testReplace(void); */
/* void testCopy(void); */
/* void testResize(void); */
/* void testReserve(void); */
/* void testSqueeze(void); */
void
testAppendTwoAtATime
(
void
);
void
testAppendThreeAtATime
(
void
);
void
testAppendFourAtATime
(
void
);
void
testAppendArray
(
void
);
void
testSetAt
(
void
);
void
testValue
(
void
);
void
testReplace
(
void
);
void
testResize
(
void
);
void
testReserve
(
void
);
void
testSqueeze
(
void
);
/* void testCompare(void); */
/*
void testRemove(void);
*/
/*
void testRemoveFirstLast(void);
*/
void
testRemove
(
void
);
void
testRemoveFirstLast
(
void
);
/* void testExtend(void); */
/* void testReverse(void); */
/* void testReversed(void); */
/* void testMid(void); */
/* void testLeft(void); */
/* void testRight(void); */
/*
void testIterate(void);
*/
/*
void testCopyPrealloc(void);
*/
/*
void testInsert(void);
*/
void
testIterate
(
void
);
void
testCopyPrealloc
(
void
);
void
testInsert
(
void
);
/* void testSetRawData(void); */
/* void testFromRawData(void); */
/* void testFromWritableRawData(void); */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment