Bug 588186 - Remove permanent Debug output (qDebug) from widget related code. r=mozilla a=npodb

This commit is contained in:
Oleg Romashin 2010-08-26 08:18:06 -07:00
parent 991aa045d7
commit b84267821a
5 changed files with 22 additions and 18 deletions

View File

@ -109,7 +109,7 @@ nsClipboard::SetNativeClipboardData( nsITransferable *aTransferable,
{
if (nsnull == aTransferable)
{
qDebug("nsClipboard::SetNativeClipboardData(): no transferable!");
NS_WARNING("nsClipboard::SetNativeClipboardData(): no transferable!");
return NS_ERROR_FAILURE;
}
@ -120,7 +120,7 @@ nsClipboard::SetNativeClipboardData( nsITransferable *aTransferable,
if (NS_FAILED(rv))
{
qDebug("nsClipboard::SetNativeClipboardData(): no FlavorsTransferable !");
NS_WARNING("nsClipboard::SetNativeClipboardData(): no FlavorsTransferable !");
return NS_ERROR_FAILURE;
}
@ -264,7 +264,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable *aTransferable,
{
if (nsnull == aTransferable)
{
qDebug(" GetNativeClipboardData: Transferable is null!");
NS_WARNING("GetNativeClipboardData: Transferable is null!");
return NS_ERROR_FAILURE;
}
@ -276,8 +276,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable *aTransferable,
if (NS_FAILED(errCode))
{
qDebug("nsClipboard::GetNativeClipboardData(): no FlavorsTransferable %i !",
errCode);
NS_WARNING("nsClipboard::GetNativeClipboardData(): no FlavorsTransferable!");
return NS_ERROR_FAILURE;
}
@ -539,7 +538,7 @@ nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
}
else
{
qDebug(" nsClipboard::GetData(), aTransferable is NULL.");
NS_WARNING("nsClipboard::GetData(), aTransferable is NULL.");
}
return NS_ERROR_FAILURE;
}

View File

@ -51,7 +51,6 @@ NS_IMPL_QUERY_INTERFACE2(nsDragService, nsIDragService, nsIDragSession )
nsDragService::nsDragService() : mDrag(NULL)
{
/* member initializers and constructor code */
// TODO: Any other better source? (the main window?)
//mHiddenWidget = new QWidget(0,QWidget::tr("DragDrop"),0);
mHiddenWidget = new QWidget();
@ -93,13 +92,13 @@ nsDragService::SetupDragSession(
aTransferables->Count(&itemCount);
if (0 == itemCount)
{
qDebug("No items to drag?");
NS_WARNING("No items to drag?");
return NS_ERROR_FAILURE;
}
if (1 != itemCount)
{
qDebug("Dragging more than one item, cannot do (yet?)");
NS_WARNING("Dragging more than one item, cannot do (yet?)");
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -232,9 +231,8 @@ nsDragService::InvokeDragSessionWithImage(
// and then:
// mDrag->setPixmap( pixmap ) or mDrag->setDragCursor( pixmap );
// mDrad->setHotSpot( point );
// TODO: Not implemented yet as this cannot be currently tested
qDebug("Support for drag image not implemented");
NS_WARNING("Support for drag image not implemented");
}
return ExecuteDrag();

View File

@ -55,6 +55,11 @@
#include "nsNetUtil.h"
#include "nsReadableUtils.h"
#include "nsIWidget.h"
#include "prlog.h"
#ifdef PR_LOGGING
static PRLogModuleInfo* sFilePickerLog = nsnull;
#endif
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
@ -63,19 +68,20 @@ nsFilePicker::nsFilePicker()
: mDialog(0),
mMode(nsIFilePicker::modeOpen)
{
qDebug("nsFilePicker constructor");
#ifdef PR_LOGGING
if (!sFilePickerLog)
sFilePickerLog = PR_NewLogModule("nsQtFilePicker");
#endif
}
nsFilePicker::~nsFilePicker()
{
qDebug("nsFilePicker destructor");
delete mDialog;
}
NS_IMETHODIMP
nsFilePicker::Init(nsIDOMWindow *parent, const nsAString & title, PRInt16 mode)
{
qDebug("nsFilePicker::Init()");
return nsBaseFilePicker::Init(parent, title, mode);
}
@ -204,7 +210,6 @@ nsFilePicker::GetFiles(nsISimpleEnumerator * *aFiles)
NS_IMETHODIMP
nsFilePicker::Show(PRInt16 *aReturn)
{
qDebug("nsFilePicker::Show()");
nsCAutoString directory;
if (mDisplayDirectory) {
mDisplayDirectory->GetNativePath(directory);
@ -248,7 +253,7 @@ nsFilePicker::Show(PRInt16 *aReturn)
}
QString path = QFile::encodeName(selected);
qDebug("path is '%s'", path.toAscii().data());
PR_LOG(sFilePickerLog, PR_LOG_DEBUG, ("path is '%s'", path.toAscii().data()));
mFile.Assign(path.toUtf8().data());
*aReturn = nsIFilePicker::returnOK;
if (mMode == modeSave) {
@ -279,7 +284,7 @@ nsFilePicker::Show(PRInt16 *aReturn)
void nsFilePicker::InitNative(nsIWidget *parent, const nsAString &title, PRInt16 mode)
{
qDebug("nsFilePicker::InitNative()");
PR_LOG(sFilePickerLog, PR_LOG_DEBUG, ("nsFilePicker::InitNative"));
nsAutoString str(title);
mDialog = new QFileDialog(0, QString::fromUtf16(str.get()));

View File

@ -253,7 +253,7 @@ DOMKeyCodeToQtKeyCode(int aKeysym)
// keypad numbers
if (aKeysym >= NS_VK_NUMPAD0 && aKeysym <= NS_VK_NUMPAD9) {
qDebug("FIXME:>>>>>>Func:%s::%d\n", __PRETTY_FUNCTION__, __LINE__);
NS_ERROR("keypad numbers conversion not implemented");
//return aKeysym - NS_VK_NUMPAD0 + Qt::Key_KP_0;
return 0;
}

View File

@ -2324,7 +2324,9 @@ nsChildWindow::~nsChildWindow()
nsPopupWindow::nsPopupWindow()
{
#ifdef DEBUG_WIDGETS
qDebug("===================== popup!");
#endif
}
nsPopupWindow::~nsPopupWindow()