Commit d516923f authored by alp@webkit.org's avatar alp@webkit.org

2008-05-01 Alp Toker <alp@nuanti.com>

        Qt/Win build fix attempt following plugin changes. Add missing return
        statements.

        Also fixes some newly introduced coding style issues in the Qt port.

        * platform/qt/FileSystemQt.cpp:
        (WebCore::openTemporaryFile):
        (WebCore::closeFile):
        (WebCore::writeToFile):
        (WebCore::unloadModule):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 28ea4676
2008-05-01 Alp Toker <alp@nuanti.com>
Qt/Win build fix attempt following plugin changes. Add missing return
statements.
Also fixes some newly introduced coding style issues in the Qt port.
* platform/qt/FileSystemQt.cpp:
(WebCore::openTemporaryFile):
(WebCore::closeFile):
(WebCore::writeToFile):
(WebCore::unloadModule):
2008-05-01 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
......@@ -98,7 +98,7 @@ String directoryName(const String& path)
CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
{
QFile *temp = new QTemporaryFile(QString(prefix));
if( temp->open(QIODevice::ReadWrite) ) {
if (temp->open(QIODevice::ReadWrite)) {
handle = temp;
return String(temp->fileName()).utf8();
}
......@@ -108,7 +108,7 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
void closeFile(PlatformFileHandle& handle)
{
if(handle) {
if (handle) {
handle->close();
delete handle;
}
......@@ -116,15 +116,20 @@ void closeFile(PlatformFileHandle& handle)
int writeToFile(PlatformFileHandle handle, const char* data, int length)
{
if(handle && handle->exists() && handle->isWritable()) {
handle->write(data, length);
}
if (handle && handle->exists() && handle->isWritable())
return handle->write(data, length);
return 0;
}
bool unloadModule(PlatformModule module)
{
if (module->unload())
if (module->unload()) {
delete module;
return true;
}
return false;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment