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
Родитель f6559ed37a
Коммит 9e3fcd371b
5 изменённых файлов: 22 добавлений и 18 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -253,7 +253,7 @@ DOMKeyCodeToQtKeyCode(int aKeysym)
// keypad numbers // keypad numbers
if (aKeysym >= NS_VK_NUMPAD0 && aKeysym <= NS_VK_NUMPAD9) { 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 aKeysym - NS_VK_NUMPAD0 + Qt::Key_KP_0;
return 0; return 0;
} }

Просмотреть файл

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