Changeset 156775 in webkit
- Timestamp:
- Oct 2, 2013 11:03:37 AM (10 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 3 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r156692 r156775 1 2013-10-02 Anders Carlsson <andersca@apple.com> 2 3 Remove Qt code from WTF 4 https://bugs.webkit.org/show_bug.cgi?id=122221 5 6 Reviewed by Antti Koivisto. 7 8 I'm keeping the PLATFORM(QT) defines in Platform.h for now so we can assess if there are any 9 Qt only features that we can remove later. 10 11 * WTF.pri: Removed. 12 * WTF.pro: Removed. 13 * wtf/Assertions.cpp: 14 * wtf/CurrentTime.cpp: 15 * wtf/DisallowCType.h: 16 * wtf/FastMalloc.cpp: 17 * wtf/FeatureDefines.h: 18 * wtf/qt/MainThreadQt.cpp: Removed. 19 * wtf/qt/StringQt.cpp: Removed. 20 * wtf/text/AtomicString.h: 21 * wtf/text/StringImpl.cpp: 22 (WTF::StringImpl::~StringImpl): 23 * wtf/text/StringImpl.h: 24 * wtf/text/WTFString.cpp: 25 (WTF::String::format): 26 * wtf/text/WTFString.h: 27 1 28 2013-09-30 Sam Weinig <sam@webkit.org> 2 29 -
trunk/Source/WTF/wtf/Assertions.cpp
r156128 r156775 278 278 279 279 #if OS(DARWIN) || OS(LINUX) 280 # if PLATFORM( QT) || PLATFORM(GTK)280 # if PLATFORM(GTK) 281 281 # if defined(__GLIBC__) && !defined(__UCLIBC__) 282 282 # define WTF_USE_BACKTRACE_SYMBOLS 1 -
trunk/Source/WTF/wtf/CurrentTime.cpp
r149178 r156775 60 60 #endif 61 61 62 #if PLATFORM(QT)63 #include <QElapsedTimer>64 #endif65 66 62 namespace WTF { 67 63 … … 284 280 } 285 281 286 #elif USE(GLIB) && !PLATFORM(EFL) && !PLATFORM(QT)282 #elif USE(GLIB) && !PLATFORM(EFL) 287 283 288 284 double monotonicallyIncreasingTime() 289 285 { 290 286 return static_cast<double>(g_get_monotonic_time() / 1000000.0); 291 }292 293 #elif PLATFORM(QT)294 295 double monotonicallyIncreasingTime()296 {297 ASSERT(QElapsedTimer::isMonotonic());298 static QElapsedTimer timer;299 return timer.nsecsElapsed() / 1.0e9;300 287 } 301 288 -
trunk/Source/WTF/wtf/DisallowCType.h
r149178 r156775 42 42 // isacii(). 43 43 #include <wtf/Platform.h> 44 #if ! PLATFORM(QT) && !(OS(DARWIN) && PLATFORM(GTK)) && !OS(QNX) && !defined(_LIBCPP_VERSION)44 #if !(OS(DARWIN) && PLATFORM(GTK)) && !OS(QNX) && !defined(_LIBCPP_VERSION) 45 45 46 46 #include <ctype.h> -
trunk/Source/WTF/wtf/FastMalloc.cpp
r156596 r156775 108 108 109 109 // Harden the pointers stored in the TCMalloc linked lists 110 #if !PLATFORM(QT)111 110 #define ENABLE_TCMALLOC_HARDENING 1 112 #endif113 111 114 112 // Use a background thread to periodically scavenge memory to release back to the system -
trunk/Source/WTF/wtf/FeatureDefines.h
r156692 r156775 300 300 #endif /* PLATFORM(GTK) */ 301 301 302 /* --------- Qt port (Unix, Windows, Mac, WinCE) --------- */303 #if PLATFORM(QT)304 305 #if OS(UNIX)306 #if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)307 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1308 #endif309 #endif310 311 #endif /* PLATFORM(QT) */312 313 302 /* --------- Blackberry port (QNX) --------- */ 314 303 #if PLATFORM(BLACKBERRY) -
trunk/Source/WTF/wtf/text/AtomicString.h
r152816 r156775 150 150 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } 151 151 operator NSString*() const { return m_string; } 152 #endif153 #if PLATFORM(QT)154 AtomicString(const QString& s) : m_string(add(String(s).impl())) { }155 operator QString() const { return m_string; }156 152 #endif 157 153 #if PLATFORM(BLACKBERRY) -
trunk/Source/WTF/wtf/text/StringImpl.cpp
r153686 r156775 138 138 return; 139 139 } 140 #if PLATFORM(QT)141 if (ownership == BufferAdoptedQString) {142 if (!m_qStringData->ref.deref())143 QStringData::deallocate(m_qStringData);144 return;145 }146 #endif147 140 148 141 ASSERT(ownership == BufferSubstring); … … 1933 1926 } 1934 1927 1935 #if PLATFORM(QT)1936 PassRefPtr<StringImpl> StringImpl::adopt(QStringData* qStringData)1937 {1938 ASSERT(qStringData);1939 1940 if (!qStringData->size)1941 return empty();1942 1943 return adoptRef(new StringImpl(qStringData, ConstructAdoptedQString));1944 }1945 #endif1946 1947 1928 size_t StringImpl::sizeInBytes() const 1948 1929 { -
trunk/Source/WTF/wtf/text/StringImpl.h
r155563 r156775 35 35 #include <wtf/text/ConversionMode.h> 36 36 #include <wtf/unicode/Unicode.h> 37 38 #if PLATFORM(QT)39 #include <QString>40 #endif41 37 42 38 #if USE(CF) … … 160 156 BufferOwned, 161 157 BufferSubstring, 162 #if PLATFORM(QT)163 BufferAdoptedQString164 #endif165 // NOTE: Adding more ownership types needs to extend m_hashAndFlags as we're at capacity166 158 }; 167 159 … … 342 334 } 343 335 344 #if PLATFORM(QT)345 // Used to create new strings that adopt an existing QString's data346 enum ConstructAdoptedQStringTag { ConstructAdoptedQString };347 StringImpl(QStringData* qStringData, ConstructAdoptedQStringTag)348 : m_refCount(s_refCountIncrement)349 , m_length(qStringData->size)350 , m_data16(0)351 , m_qStringData(qStringData)352 , m_hashAndFlags(BufferAdoptedQString)353 {354 ASSERT(m_length);355 356 // We ref the string-data to ensure it will be valid for the lifetime of357 // this string. We then deref it in the destructor, so that the string358 // data can eventually be freed.359 m_qStringData->ref.ref();360 361 // Now that we have a ref we can safely reference the string data362 m_data16 = reinterpret_cast_ptr<const UChar*>(qStringData->data());363 ASSERT(m_data16);364 365 STRING_STATS_ADD_16BIT_STRING(m_length);366 }367 #endif368 336 ~StringImpl(); 369 337 … … 482 450 WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> adopt(StringBuffer<LChar>&); 483 451 484 #if PLATFORM(QT)485 static PassRefPtr<StringImpl> adopt(QStringData*);486 #endif487 488 452 unsigned length() const { return m_length; } 489 453 bool is8Bit() const { return m_hashAndFlags & s_hashFlag8BitBuffer; } … … 566 530 #endif 567 531 568 #if PLATFORM(QT)569 QStringData* qStringData() { return bufferOwnership() == BufferAdoptedQString ? m_qStringData : 0; }570 #endif571 572 532 static WTF_EXPORT_STRING_API CString utf8ForCharacters(const UChar* characters, unsigned length, ConversionMode = LenientConversion); 573 533 WTF_EXPORT_STRING_API CString utf8ForRange(unsigned offset, unsigned length, ConversionMode = LenientConversion) const; … … 874 834 StringImpl* m_substringBuffer; 875 835 mutable UChar* m_copyData16; 876 #if PLATFORM(QT)877 QStringData* m_qStringData;878 #endif879 836 }; 880 837 mutable unsigned m_hashAndFlags; -
trunk/Source/WTF/wtf/text/WTFString.cpp
r153135 r156775 412 412 String String::format(const char *format, ...) 413 413 { 414 #if PLATFORM(QT) 415 // Use QString::vsprintf to avoid the locale dependent formatting of vsnprintf. 416 // https://bugs.webkit.org/show_bug.cgi?id=18994 417 va_list args; 418 va_start(args, format); 419 420 QString buffer; 421 buffer.vsprintf(format, args); 422 423 va_end(args); 424 425 QByteArray ba = buffer.toUtf8(); 426 return StringImpl::create(reinterpret_cast<const LChar*>(ba.constData()), ba.length()); 427 428 #elif OS(WINCE) 414 #if OS(WINCE) 429 415 va_list args; 430 416 va_start(args, format); -
trunk/Source/WTF/wtf/text/WTFString.h
r155115 r156775 33 33 #endif 34 34 35 #if PLATFORM(QT)36 QT_BEGIN_NAMESPACE37 class QString;38 QT_END_NAMESPACE39 #endif40 41 35 #if PLATFORM(BLACKBERRY) 42 36 namespace BlackBerry { … … 352 346 WTF_EXPORT_STRING_API String foldCase() const; 353 347 354 #if !PLATFORM(QT)355 348 WTF_EXPORT_STRING_API static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2); 356 #else357 WTF_EXPORT_STRING_API static String format(const char *, ...);358 #endif359 349 360 350 // Returns an uninitialized string. The characters needs to be written … … 422 412 // need this mapping because AppKit crashes when passed nil NSStrings. 423 413 operator NSString*() const { if (!m_impl) return @""; return *m_impl; } 424 #endif425 426 #if PLATFORM(QT)427 WTF_EXPORT_STRING_API String(const QString&);428 WTF_EXPORT_STRING_API String(const QStringRef&);429 WTF_EXPORT_STRING_API operator QString() const;430 414 #endif 431 415
Note: See TracChangeset
for help on using the changeset viewer.