Permalink
Browse files

:J, Fix bugs

  • Loading branch information...
1 parent 1ab45be commit e1b609f2ffc15b6e54f058dd9fbb16349d3db14c @nycholas committed Aug 6, 2010
View
@@ -1,6 +1,6 @@
#############################################################################
-# Makefile for building: a3s
-# Generated by qmake (2.01a) (Qt 4.6.3) on: Wed Aug 4 10:37:56 2010
+# Makefile for building: c-project
+# Generated by qmake (2.01a) (Qt 4.6.3) on: Fri Aug 6 13:30:48 2010
# Project: bin.pro
# Template: app
# Command: /usr/bin/qmake -unix -o Makefile bin.pro
@@ -13,10 +13,10 @@ CXX = g++
DEFINES = -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH = -I/usr/share/qt/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I../src -I/home/nycholas/project/src/o_lalertom/nycholas/src/nycholas/code/c++/gui/qt4/app-auth-and-session/bin/.moc/release-shared
-LINK = cp /home/nycholas/project/src/o_lalertom/nycholas/src/nycholas/code/c++/gui/qt4/app-auth-and-session/bin/a3s $@ && : IGNORE REST
+INCPATH = -I/usr/share/qt/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I../src -I/home/nycholas/project/src/etegila/src/c-project/bin/.moc/release-shared
+LINK = cp /home/nycholas/project/src/etegila/src/c-project/bin/c-project $@ && : IGNORE REST
LFLAGS = -m64 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,--no-undefined -Wl,-O1
-LIBS = $(SUBLIBS) -L/usr/lib -L/home/nycholas/project/src/o_lalertom/nycholas/src/nycholas/code/c++/gui/qt4/app-auth-and-session/lib/a3s -lQtGui -lQtCore -lpthread
+LIBS = $(SUBLIBS) -L/usr/lib -L/home/nycholas/project/src/etegila/src/c-project/lib/c-project -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake
@@ -53,7 +53,7 @@ DIST = /usr/share/qt/mkspecs/common/g++.conf \
/usr/share/qt/mkspecs/features/qt_config.prf \
/usr/share/qt/mkspecs/features/exclusive_builds.prf \
/usr/share/qt/mkspecs/features/default_pre.prf \
- ../a3s.pri \
+ ../c-project.pri \
/usr/share/qt/mkspecs/features/release.prf \
/usr/share/qt/mkspecs/features/default_post.prf \
/usr/share/qt/mkspecs/features/warn_on.prf \
@@ -65,9 +65,9 @@ DIST = /usr/share/qt/mkspecs/common/g++.conf \
/usr/share/qt/mkspecs/features/yacc.prf \
/usr/share/qt/mkspecs/features/lex.prf \
bin.pro
-QMAKE_TARGET = a3s
+QMAKE_TARGET = c-project
DESTDIR =
-TARGET = a3s
+TARGET = c-project
first: all
####### Implicit rules
@@ -93,7 +93,7 @@ first: all
all: Makefile $(TARGET)
-$(TARGET): /home/nycholas/project/src/o_lalertom/nycholas/src/nycholas/code/c++/gui/qt4/app-auth-and-session/bin/a3s $(OBJECTS)
+$(TARGET): /home/nycholas/project/src/etegila/src/c-project/bin/c-project $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: bin.pro /usr/share/qt/mkspecs/linux-g++-64/qmake.conf /usr/share/qt/mkspecs/common/g++.conf \
@@ -104,7 +104,7 @@ Makefile: bin.pro /usr/share/qt/mkspecs/linux-g++-64/qmake.conf /usr/share/qt/m
/usr/share/qt/mkspecs/features/qt_config.prf \
/usr/share/qt/mkspecs/features/exclusive_builds.prf \
/usr/share/qt/mkspecs/features/default_pre.prf \
- ../a3s.pri \
+ ../c-project.pri \
/usr/share/qt/mkspecs/features/release.prf \
/usr/share/qt/mkspecs/features/default_post.prf \
/usr/share/qt/mkspecs/features/warn_on.prf \
@@ -126,7 +126,7 @@ Makefile: bin.pro /usr/share/qt/mkspecs/linux-g++-64/qmake.conf /usr/share/qt/m
/usr/share/qt/mkspecs/features/qt_config.prf:
/usr/share/qt/mkspecs/features/exclusive_builds.prf:
/usr/share/qt/mkspecs/features/default_pre.prf:
-../a3s.pri:
+../c-project.pri:
/usr/share/qt/mkspecs/features/release.prf:
/usr/share/qt/mkspecs/features/default_post.prf:
/usr/share/qt/mkspecs/features/warn_on.prf:
@@ -143,12 +143,12 @@ qmake: FORCE
@$(QMAKE) -unix -o Makefile bin.pro
dist:
- @$(CHK_DIR_EXISTS) .tmp/a3s1.0.0 || $(MKDIR) .tmp/a3s1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/a3s1.0.0/ && (cd `dirname .tmp/a3s1.0.0` && $(TAR) a3s1.0.0.tar a3s1.0.0 && $(COMPRESS) a3s1.0.0.tar) && $(MOVE) `dirname .tmp/a3s1.0.0`/a3s1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/a3s1.0.0
+ @$(CHK_DIR_EXISTS) .tmp/c-project1.0.0 || $(MKDIR) .tmp/c-project1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/c-project1.0.0/ && (cd `dirname .tmp/c-project1.0.0` && $(TAR) c-project1.0.0.tar c-project1.0.0 && $(COMPRESS) c-project1.0.0.tar) && $(MOVE) `dirname .tmp/c-project1.0.0`/c-project1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/c-project1.0.0
clean:compiler_clean
- -$(DEL_FILE) a3s
+ -$(DEL_FILE) c-project
-$(DEL_FILE) *~ core *.core
Binary file not shown.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -2,9 +2,7 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
-CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
CREATE SCHEMA IF NOT EXISTS `cprojectdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-USE `mydb` ;
USE `cprojectdb` ;
-- -----------------------------------------------------
@@ -258,7 +256,7 @@ COLLATE = utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `cprojectdb`.`admin_register_register` (
`id` INT NOT NULL ,
`name` VARCHAR(60) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
- `description` TINYTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL ,
+ `address` TINYTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL ,
`telephone` VARCHAR(45) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
`date_joined` DATETIME NOT NULL ,
`date_changed` DATETIME NULL ,
@@ -144,12 +144,11 @@ bool UserModel::save(void) {
bool UserModel::insert(void) {
QSqlQuery query;
query.prepare("INSERT INTO auth_user "
- "(username, password, is_active, last_login, date_joined) "
- "VALUES (:username, :password, :is_active, :last_login, :date_joined)");
+ "(username, password, is_active, date_joined) "
+ "VALUES (:username, :password, :is_active, :date_joined)");
query.bindValue(":username", _username);
query.bindValue(":password", _password);
query.bindValue(":is_active", _isActive);
- query.bindValue(":last_login", _lastLogin.toString("yyyy-MM-dd hh:mm:ss"));
query.bindValue(":date_joined", _dateJoined.toString("yyyy-MM-dd hh:mm:ss"));
int st = query.exec();
if (!st)
@@ -216,7 +216,7 @@ void Act::oldestAction(void) {
void Act::createModels(void) {
actModel = new ActModel(0, this);
- actModel->setTable("x_x_x");
+ actModel->setTable("admin_register_act");
actModel->setHeaderData(act_id, Qt::Horizontal, qApp->tr("Id"));
actModel->setHeaderData(act_name, Qt::Horizontal,
qApp->tr("Name"));
@@ -216,7 +216,7 @@ void Coupon::oldestAction(void) {
void Coupon::createModels(void) {
couponModel = new CouponModel(0, this);
- couponModel->setTable("x_x_x");
+ couponModel->setTable("admin_register_coupon");
couponModel->setHeaderData(coupon_id, Qt::Horizontal, qApp->tr("Id"));
couponModel->setHeaderData(coupon_name, Qt::Horizontal,
qApp->tr("Name"));
@@ -151,7 +151,10 @@ bool RegisterModel::insert(void) {
query.bindValue(":telephone", _telephone);
query.bindValue(":date_joined", _dateJoined.toString("yyyy-MM-dd hh:mm:ss"));
query.bindValue(":is_active", _isActive);
- return query.exec();
+ int st = query.exec();
+ if (!st)
+ qDebug() << "insert:" << query.lastError();
+ return st;
}
bool RegisterModel::update(void) {
@@ -166,7 +169,10 @@ bool RegisterModel::update(void) {
query.bindValue(":telephone", _telephone);
query.bindValue(":date_changed", _dateChanged);
query.bindValue(":is_active", _isActive);
- return query.exec();
+ int st = query.exec();
+ if (!st)
+ qDebug() << "update:" << query.lastError();
+ return st;
}
bool RegisterModel::status(void) {
@@ -36,6 +36,7 @@
#include <QSqlDatabase>
#include <QSqlRecord>
#include <QSqlQuery>
+#include <QSqlError>
#include <QDateTime>
#include <QVariant>
#include <QColor>
@@ -216,7 +216,7 @@ void Register::oldestAction(void) {
void Register::createModels(void) {
registerModel = new RegisterModel(0, this);
- registerModel->setTable("x_x_x");
+ registerModel->setTable("admin_register_register");
registerModel->setHeaderData(register_id, Qt::Horizontal, qApp->tr("Id"));
registerModel->setHeaderData(register_name, Qt::Horizontal,
qApp->tr("Name"));

0 comments on commit e1b609f

Please sign in to comment.