summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-07-21 20:44:12 (UTC)
committer llornkcor <llornkcor>2004-07-21 20:44:12 (UTC)
commit51d06a743940249e34a2bcc970b825bad99819d3 (patch) (side-by-side diff)
tree4c8075a3e3b46146da7630998ee52265e83c0939
parent8d5f46620d92ff1fb9477ada28b6a1aafeed6d16 (diff)
downloadopie-51d06a743940249e34a2bcc970b825bad99819d3.zip
opie-51d06a743940249e34a2bcc970b825bad99819d3.tar.gz
opie-51d06a743940249e34a2bcc970b825bad99819d3.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/main.cpp29
-rw-r--r--noncore/apps/zsafe/zsafe.cpp20
-rw-r--r--noncore/apps/zsafe/zsafe.pro14
-rw-r--r--noncore/apps/zsafe/zsafe_win32.pro2
-rw-r--r--noncore/apps/zsafe/zsafe_x86.pro21
5 files changed, 58 insertions, 28 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp
index c187520..2707730 100644
--- a/noncore/apps/zsafe/main.cpp
+++ b/noncore/apps/zsafe/main.cpp
@@ -48,11 +48,11 @@ void resume (int signum)
}
int main( int argc, char ** argv )
{
-#ifndef WIN32
+#ifndef Q_WS_WIN
// install signal handler
- signal (SIGSTOP, suspend);
+// signal (SIGSTOP, suspend);
#endif
#ifdef DESKTOP
QApplication a( argc, argv );
@@ -63,9 +63,9 @@ int main( int argc, char ** argv )
#ifdef DESKTOP
if (argc >= 3)
{
-#ifndef WIN32
+#ifndef Q_WS_WIN
DeskW = atoi(argv[1]);
DeskH = atoi(argv[2]);
#else
int w, h;
@@ -83,35 +83,40 @@ int main( int argc, char ** argv )
#else
DeskW = a.desktop()->width();
DeskH = a.desktop()->height();
+#ifndef NO_OPIE
owarn << "Width: " << DeskW << " Height: " << DeskH << oendl;
-
+#endif
#ifdef JPATCH_HDE
// nothings
#else
if (DeskW > 240)
{
DeskW -= 20;
DeskH += 25;
+#ifndef NO_OPIE
owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl;
+#endif
}
#endif
#endif
- ZSafe mw;
- zs = &mw;
-
-#ifndef WIN32
- signal (SIGCONT, resume);
+ ZSafe *mw = new ZSafe( 0, 0, QWidget::WDestructiveClose );
+// ZSafe mw;
+// zs = &mw;
+ zs = mw;
+
+#ifndef Q_WS_WIN
+// signal (SIGCONT, resume);
#endif
#ifdef DESKTOP
- a.setMainWidget(&mw);
- mw.show();
+ a.setMainWidget(mw);
+ mw->show();
#else
// a.showMainWidget( &mw );
- a.showMainDocumentWidget( &mw );
+ a.showMainDocumentWidget( mw );
#endif
int ret = a.exec();
return ret;
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index 1c15852..2dd94aa 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -373,9 +373,9 @@ static const char* const general_data[] = {
conf->insertSearchPath (QSettings::Unix, cfgFile);
#endif
#else
conf = new Config (cfgFile, Config::File);
- conf->setGroup ("zsafe");
+ conf->setGroup ("zsafePrefs");
#endif
}
}
@@ -491,9 +491,9 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl )
#endif
setCaption( tr( "ZSafe" ) );
QString zsafeAppDirPath = QDir::homeDirPath() + "/Documents/application/zsafe";
- QString filename = conf->readEntry(APP_KEY+"document");
+ filename = conf->readEntry(APP_KEY+"document");
if ( !QFileInfo(filename).exists() || !QDir(zsafeAppDirPath).exists() )
{
// check if the directory application exists, if not
// create it
@@ -761,10 +761,10 @@ void ZSafe::deletePwd()
}
void ZSafe::editPwd()
{
- if (!selectedItem)
- return;
+ if (!selectedItem)
+ return;
if (!isCategory(selectedItem))
{
// open the 'New Entry' dialog
NewDialog *dialog = new NewDialog(this, "edit_entry", TRUE);
@@ -804,9 +804,9 @@ void ZSafe::editPwd()
dialog->showMaximized();
#endif
#ifdef DESKTOP
int result = dialog->exec();
-// result = QDialog::Accepted;
+ result = QDialog::Accepted;
#endif
if (result == Accepted)
{
modified = true;
@@ -835,18 +835,18 @@ void ZSafe::editPwd()
}
void ZSafe::newPwd()
{
- if (!selectedItem)
- return;
-
+ if (!selectedItem)
+ return;
+ qWarning("new item");
if (!isCategory(selectedItem))
selectedItem = selectedItem->parent();
if (isCategory(selectedItem))
{
QString cat = selectedItem->text(0);
-
+ qWarning(cat);
// open the 'New Entry' dialog
NewDialog *dialog = new NewDialog(this, "new_entry", TRUE);
#ifdef Q_WS_WIN
dialog->setCaption ("Qt " + tr("New Entry"));
@@ -873,9 +873,9 @@ retype:
dialog->showMaximized();
#endif
#ifdef DESKTOP
int result = dialog->exec();
-// result = QDialog::Accepted;
+ result = QDialog::Accepted;
#endif
if (result == Accepted)
{
diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro
index 3cae706..236d11e 100644
--- a/noncore/apps/zsafe/zsafe.pro
+++ b/noncore/apps/zsafe/zsafe.pro
@@ -14,4 +14,18 @@ LIBS += -lqpe -lopiecore2 -lopieui2
TARGET = zsafe
include ( $(OPIEDIR)/include.pro )
+QWS {
+message( "Configuring for multi-threaded Qt..." )
+
+}
+
+win32 {
+ TEMPLATE = app
+ DEFINES += DESKTOP QT_DLL QT_THREAD_SUPPORT
+ SOURCES += extra/qsettings.cpp
+ HEADERS += extra/qsettings.h
+ INCLUDEPATH += extra
+ DEPENDPATH += extra
+ RC_FILE = zsafe.rc
+}
diff --git a/noncore/apps/zsafe/zsafe_win32.pro b/noncore/apps/zsafe/zsafe_win32.pro
index 5bc2c9e..3289fa0 100644
--- a/noncore/apps/zsafe/zsafe_win32.pro
+++ b/noncore/apps/zsafe/zsafe_win32.pro
@@ -1,8 +1,8 @@
TEMPLATE = app
#CONFIG = qt warn_on thread debug
CONFIG = qt warn_on thread release
-DEFINES = DESKTOP WIN32
+DEFINES = DESKTOP
DEFINES += QT_DLL QT_THREAD_SUPPORT
HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h qsettings.h shadedlistitem.h
SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \
categorylist.cpp zlistview.cpp qsettings.cpp shadedlistitem.cpp
diff --git a/noncore/apps/zsafe/zsafe_x86.pro b/noncore/apps/zsafe/zsafe_x86.pro
index 95eb63f..6bffd23 100644
--- a/noncore/apps/zsafe/zsafe_x86.pro
+++ b/noncore/apps/zsafe/zsafe_x86.pro
@@ -1,16 +1,27 @@
TEMPLATE = app
-#CONFIG = qt warn_on debug
-CONFIG = qt warn_on release thread
-DEFINES = DESKTOP QT_THREAD_SUPPORT
+# CONFIG = qt warn_on debug
+CONFIG = qt warn_on release
+DEFINES = DESKTOP NO_OPIE
HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h shadedlistitem.h
SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp categorylist.cpp zlistview.cpp shadedlistitem.cpp
INCLUDEPATH += $(QTDIR)/include
INCLUDEPATH += .
DEPENDPATH += $(QTDIR)/include
-#LIBS +=-L$(QPEDIR)/lib -lqt
-LIBS +=-Wl,-rpath,/usr/lib/qt3/lib -L/usr/lib/qt3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
INTERFACES = newdialog.ui searchdialog.ui passworddialog.ui categorydialog.ui
INTERFACES += infoform.ui wait.ui
TARGET = zsafe
#DESTDIR = ../bin
TRANSLATIONS = i18n/de/zsafe.ts
+MOC_DIR=.x11
+OBJECTS_DIR=.x11
+
+isEmpty(OPIEDIR) {
+ message( "Configuring for multi-threaded Qt..." )
+}
+
+win32 {
+HEADERS+=extra/qsettings.h
+SOURCES+=extra/qsettings.cpp
+INCLUDEPATH += extra
+DEPENDPATH += extra
+}