PDA

View Full Version : "QWarning: Not implemented in this release"



arunvv
19th August 2008, 02:06
Hi All,

I am working on Qt4.2 app, which updates the image based on unix signal from another process which was written in C. So whenever i get a signal from other process to Qt App I am getting a warning from Qt as "Not implemented in this release". When I debugged this qwarning in QtopiaCore-4.2.2, it appears to be from setWindowRegion function in "src/gui/embedded/qwindowsystem_qws.cpp".

So it seems to me that the warning is coming because of (i feel this is coming by calling enablePainting() function from the same file) whenever there is a change in painting, it paints in the region of window server region, So how to get rid of this qwarning.

Here is the Snippet of Code on receiving signal from another process and painting based on events.

main.cpp

void updateImg(int sig)
{
printf("SIGUSR1 signal from C Process\n");
QApplication::postEvent(qApp->activeWindow(), new QEvent(QEvent::User));
}

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QFont f("helvetica");
MainWindow h;
struct sigaction sa;
memset( &sa , 0, sizeof(sa));

sa.sa_handler = updateImg;
sa.sa_flags |= 0;
::sigemptyset(&sa.sa_mask );
::sigaction(SIGUSR1, &sa, NULL);

// disable minimize/maximize buttons
h.labelTitle->setText("VERSION1");

h.move(35,0);
f.setPointSize(24);
app.setFont(f);
h.show();

return app.exec();
}

test.h

class MainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
public:
MainWindow(QMainWindow *parent = 0);
~MainWindow();

void Event( QEvent *ev ) {if( ev->type() == QEvent::User ){emit update_Img();}}
.....
....
};
/updating image icon by shared memory
test.cpp


.......
......
void MainWindow::update_Img()
{
temp_shm_data_t tempShm;
static unsigned char image[MAX_FNAME_LEN] = "\0";
static unsigned char mage_prev[MAX_FNAME_LEN] = "\0";
if(V_SEM_LOCKR( &shmPtr->temp_data.h.ch_lock) == WFALSE)
{
PRNT_DBG_LOG("read lock failed");
return;
}

tempShm = shmPtr->temp_data;

if(V_SEM_UNLOCKR( &shmPtr->dvin_data.h.ch_lock) == WFALSE)
{
PRNT_DBG_LOG("read unlock failed");
return;
}

strcpy((char *)image_prev,(const char *)image);
strcpy((char *)image,(const char *)tempShm.dvin_vga_icon);

if(strcmp((const char *)image_prev, (const char *)image) != 0)
{
mw->temp_Img->setPixmap(QPixmap((const char *)image));
}
}
......
......

Is there anything wrong in the implementation, or is there anything to be added, it seems to me I am getting signal and updating the image based on signal. But iam getting the above said warning and printing on console.
How to get rid of this warning message?